mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Changed --bind-http-to-localhost to be a boolean flag argument
This commit is contained in:
parent
785ee4b726
commit
bf2b322739
@ -13,13 +13,13 @@ from hostlist import public_dns_names
|
||||
|
||||
# Parse the command-line arguments
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--bind-http-to-localhost",
|
||||
help="should RethinkDB web interface be bound to localhost?",
|
||||
required=True)
|
||||
# The next line isn't strictly necessary, but it clarifies the default case:
|
||||
parser.set_defaults(bind_http_to_localhost=False)
|
||||
parser.add_argument('--bind-http-to-localhost',
|
||||
action='store_true',
|
||||
help='should RethinkDB web interface be bound to localhost?')
|
||||
args = parser.parse_args()
|
||||
# args.bind_http_to_localhost is a string at this point.
|
||||
# It's either 'True' or 'False' but we want a boolean:
|
||||
bind_http_to_localhost = (args.bind_http_to_localhost == 'True')
|
||||
bind_http_to_localhost = args.bind_http_to_localhost
|
||||
|
||||
# cwd = current working directory
|
||||
old_cwd = os.getcwd()
|
||||
|
Loading…
x
Reference in New Issue
Block a user