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)
|
defaults.networkDefaultPayloadLengthExtraBytes / 100)
|
||||||
|
|
||||||
class Main:
|
class Main:
|
||||||
def start(self, daemon=False):
|
def start(self):
|
||||||
_fixSocket()
|
_fixSocket()
|
||||||
|
|
||||||
|
daemon = BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], "hcd",
|
opts, args = getopt.getopt(sys.argv[1:], "hcd",
|
||||||
["help", "curses", "daemon"])
|
["help", "curses", "daemon"])
|
||||||
|
@ -406,8 +408,7 @@ All parameters are optional.
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
mainprogram = Main()
|
mainprogram = Main()
|
||||||
mainprogram.start(
|
mainprogram.start()
|
||||||
BMConfigParser().safeGetBoolean('bitmessagesettings', 'daemon'))
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
Reference in New Issue
Block a user