From 08748fa9aeb992c4ace43e0a9fe2ea487b7b0d75 Mon Sep 17 00:00:00 2001 From: f97ada87 Date: Wed, 27 Sep 2017 00:36:02 +1000 Subject: [PATCH] move config read inside main function --- src/bitmessagemain.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 1a091c4c..06d89ba8 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -198,9 +198,11 @@ if shared.useVeryEasyProofOfWorkForTesting: defaults.networkDefaultPayloadLengthExtraBytes / 100) class Main: - def start(self, daemon=False): + def start(self): _fixSocket() + daemon = BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon') + try: opts, args = getopt.getopt(sys.argv[1:], "hcd", ["help", "curses", "daemon"]) @@ -406,8 +408,7 @@ All parameters are optional. def main(): mainprogram = Main() - mainprogram.start( - BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon')) + mainprogram.start() if __name__ == "__main__": main()