Don't propagate loggers; add some logging. #291
|
@ -21,6 +21,7 @@ import socket
|
||||||
import random
|
import random
|
||||||
import highlevelcrypto
|
import highlevelcrypto
|
||||||
import shared
|
import shared
|
||||||
|
from debug import logger
|
||||||
|
|
||||||
config = ConfigParser.SafeConfigParser()
|
config = ConfigParser.SafeConfigParser()
|
||||||
myECCryptorObjects = {}
|
myECCryptorObjects = {}
|
||||||
|
@ -132,11 +133,11 @@ def lookupAppdataFolder():
|
||||||
dataFolder = path.join(environ["HOME"], ".config", APPNAME)
|
dataFolder = path.join(environ["HOME"], ".config", APPNAME)
|
||||||
|
|
||||||
# Migrate existing data to the proper location if this is an existing install
|
# Migrate existing data to the proper location if this is an existing install
|
||||||
if not os.path.exists(dataFolder):
|
|
||||||
try:
|
try:
|
||||||
logger.info("Moving data folder to ~/.config/%s" % APPNAME)
|
logger.info("Moving data folder to %s" % (dataFolder))
|
||||||
move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder)
|
move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder)
|
||||||
except IOError:
|
except IOError:
|
||||||
|
pass
|
||||||
dataFolder = dataFolder + '/'
|
dataFolder = dataFolder + '/'
|
||||||
return dataFolder
|
return dataFolder
|
||||||
|
|
||||||
|
@ -255,8 +256,9 @@ def doCleanShutdown():
|
||||||
broadcastToSendDataQueues((0, 'shutdown', 'all'))
|
broadcastToSendDataQueues((0, 'shutdown', 'all'))
|
||||||
|
|
||||||
logger.info('Flushing inventory in memory out to disk...')
|
logger.info('Flushing inventory in memory out to disk...')
|
||||||
UISignalQueue.put(('updateStatusBar','Flushing inventory in memory out to disk. '
|
UISignalQueue.put((
|
||||||
'This should normally only take a second...'))
|
'updateStatusBar',
|
||||||
|
'Flushing inventory in memory out to disk. This should normally only take a second...'))
|
||||||
flushInventory()
|
flushInventory()
|
||||||
|
|
||||||
# This one last useless query will guarantee that the previous flush committed before we close
|
# This one last useless query will guarantee that the previous flush committed before we close
|
||||||
|
|
Reference in New Issue
Block a user