No more shared.daemon variable #1095

Merged
g1itch merged 1 commits from daemon into v0.6 2018-01-25 13:12:33 +01:00
3 changed files with 2 additions and 4 deletions

View File

@ -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)

View File

@ -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

View File

@ -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