Fix preferring CLI argument over zeronet.conf

Fix using open_browser from CLI arguments in case there are several `--open_browser` arguments, which often happens after restarts.
This commit is contained in:
Ivanq 2019-08-11 12:18:55 +03:00 committed by GitHub
parent e745760520
commit 3f7e22497d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ class Config(object):
key = section + "_" + key
if key == "open_browser": # Prefer config file value over cli argument
if "--%s" % key in argv:
while "--%s" % key in argv:
pos = argv.index("--open_browser")
del argv[pos:pos + 2]