move config read inside main function
This commit is contained in:
parent
dbd12ab8b4
commit
08748fa9ae
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user