no log: Added `NO_UPDATE` env var (#1791)

pull/1799/head
Alexander Regueiro 3 years ago committed by GitHub
parent 137aa698bb
commit 85cffb332d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,6 +5,7 @@ import argparse
from distutils.util import strtobool
no_update = bool(os.environ.get("NO_UPDATE", False))
parser = argparse.ArgumentParser()
@ -16,8 +17,9 @@ def get_args():
dest="config_dir", help="Directory containing the configuration (default: %s)" % config_dir)
parser.add_argument('-p', '--port', type=int, metavar="PORT", dest="port",
help="Port number (default: 6767)")
parser.add_argument('--no-update', default=False, type=bool, const=True, metavar="BOOL", nargs="?",
help="Disable update functionality (default: False)")
if not no_update:
parser.add_argument('--no-update', default=False, type=bool, const=True, metavar="BOOL", nargs="?",
help="Disable update functionality (default: False)")
parser.add_argument('--debug', default=False, type=bool, const=True, metavar="BOOL", nargs="?",
help="Enable console debugging (default: False)")
parser.add_argument('--release-update', default=False, type=bool, const=True, metavar="BOOL", nargs="?",
@ -31,3 +33,5 @@ def get_args():
args = get_args()
if no_update:
args.no_update = True

Loading…
Cancel
Save