From 61ddc1208e21ed51510e09b3ef3ac8c6af37cd4f Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Thu, 25 Jan 2018 12:58:29 +0200 Subject: [PATCH] No more shared.daemon variable --- src/bitmessagemain.py | 2 -- src/class_singleCleaner.py | 2 +- src/shared.py | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 6f796939..74011f29 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -220,8 +220,6 @@ class Main: elif opt in ("-c", "--curses"): state.curses = True - shared.daemon = daemon - # is the application already running? If yes then exit. shared.thisapp = singleinstance("", daemon) diff --git a/src/class_singleCleaner.py b/src/class_singleCleaner.py index ed0ee044..1def6cdb 100644 --- a/src/class_singleCleaner.py +++ b/src/class_singleCleaner.py @@ -121,7 +121,7 @@ class singleCleaner(threading.Thread, StoppableThread): if "Errno 28" in str(err): logger.fatal('(while receiveDataThread knownnodes.needToWriteKnownNodesToDisk) Alert: Your disk or data storage volume is full. ') queues.UISignalQueue.put(('alert', (tr._translate("MainWindow", "Disk full"), tr._translate("MainWindow", 'Alert: Your disk or data storage volume is full. Bitmessage will now exit.'), True))) - if shared.daemon: + if shared.thisapp.daemon: os._exit(0) shared.needToWriteKnownNodesToDisk = False diff --git a/src/shared.py b/src/shared.py index 34597c78..e2f3c1cc 100644 --- a/src/shared.py +++ b/src/shared.py @@ -49,7 +49,7 @@ clientHasReceivedIncomingConnections = False #used by API command clientStatus numberOfMessagesProcessed = 0 numberOfBroadcastsProcessed = 0 numberOfPubkeysProcessed = 0 -daemon = False + needToWriteKnownNodesToDisk = False # If True, the singleCleaner will write it to disk eventually. maximumLengthOfTimeToBotherResendingMessages = 0 timeOffsetWrongCount = 0