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
1 changed files with 9 additions and 7 deletions

View File

@ -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 %s" % (dataFolder))
logger.info("Moving data folder to ~/.config/%s" % APPNAME) 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