These changes slipped from last commit. Sorry.

This commit is contained in:
Gregor Robinson 2013-07-10 20:15:04 +01:00
parent 2e2db97250
commit 3179ea30f0

View File

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