No more shared.daemon variable

This commit is contained in:
Dmitri Bogomolov 2018-01-25 12:58:29 +02:00
parent 8709051005
commit 61ddc1208e
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
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