From 3179ea30f01912a55d1ede14b1fc161d48b7969a Mon Sep 17 00:00:00 2001 From: Gregor Robinson Date: Wed, 10 Jul 2013 20:15:04 +0100 Subject: [PATCH] These changes slipped from last commit. Sorry. --- src/shared.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/shared.py b/src/shared.py index 313e2ac6..c706038a 100644 --- a/src/shared.py +++ b/src/shared.py @@ -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