style: Format the code a little bit

This will remove the unnecesary import of time, and a little bit of format

Signed-off-by: nothingbutlucas <69118979+nothingbutlucas@users.noreply.github.com>
This commit is contained in:
nothingbutlucas 2024-04-24 11:28:00 -03:00
parent 87ff1808a2
commit 541d3cde48
No known key found for this signature in database
GPG Key ID: 31DE05DB3B0D9074

View File

@ -24,7 +24,6 @@
import RNS import RNS
import argparse import argparse
import time
from RNS._version import __version__ from RNS._version import __version__
@ -38,9 +37,10 @@ def program_setup(configdir, verbosity = 0, quietness = 0, service = False):
else: else:
targetlogdest = RNS.LOG_STDOUT targetlogdest = RNS.LOG_STDOUT
reticulum = RNS.Reticulum(configdir=configdir, verbosity=targetverbosity, logdest=targetlogdest) RNS.Reticulum(configdir=configdir, verbosity=targetverbosity, logdest=targetlogdest)
exit(0) exit(0)
def main(): def main():
try: try:
parser = argparse.ArgumentParser(description="Reticulum Distributed Identity Resolver") parser = argparse.ArgumentParser(description="Reticulum Distributed Identity Resolver")
@ -49,17 +49,15 @@ def main():
parser.add_argument('-q', '--quiet', action='count', default=0) parser.add_argument('-q', '--quiet', action='count', default=0)
parser.add_argument("--exampleconfig", action='store_true', default=False, help="print verbose configuration example to stdout and exit") parser.add_argument("--exampleconfig", action='store_true', default=False, help="print verbose configuration example to stdout and exit")
parser.add_argument("--version", action="version", version="ir {version}".format(version=__version__)) parser.add_argument("--version", action="version", version="ir {version}".format(version=__version__))
args = parser.parse_args() args = parser.parse_args()
if args.exampleconfig: if args.exampleconfig:
print(__example_rns_config__) print(__example_rns_config__)
exit() exit()
configarg = None
if args.config: if args.config:
configarg = args.config configarg = args.config
else:
configarg = None
program_setup(configdir=configarg, verbosity=args.verbose, quietness=args.quiet) program_setup(configdir=configarg, verbosity=args.verbose, quietness=args.quiet)
@ -67,6 +65,7 @@ def main():
print("") print("")
exit() exit()
__example_rns_config__ = '''# This is an example Identity Resolver file. __example_rns_config__ = '''# This is an example Identity Resolver file.
''' '''