From 3f7e22497dc86416e140d29fab61c195a78c0fec Mon Sep 17 00:00:00 2001 From: Ivanq Date: Sun, 11 Aug 2019 12:18:55 +0300 Subject: [PATCH] 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. --- src/Config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Config.py b/src/Config.py index 2fd8b3f8..50527fb1 100644 --- a/src/Config.py +++ b/src/Config.py @@ -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]