Skip to content

Commit 5ca0eac

Browse files
author
Jonathan Warren
committed
Merge pull request #302 from DivineOmega/fix_missing_logger
Fix missing logger
2 parents b500a01 + 3107150 commit 5ca0eac

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/shared.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,11 @@ def lookupAppdataFolder():
118118
if "HOME" in environ:
119119
dataFolder = path.join(os.environ["HOME"], "Library/Application Support/", APPNAME) + '/'
120120
else:
121-
logger.critical('Could not find home folder, please report this message and your '
122-
'OS X version to the BitMessage Github.')
121+
stringToLog = 'Could not find home folder, please report this message and your OS X version to the BitMessage Github.'
122+
if 'logger' in globals():
123+
logger.critical(stringToLog)
124+
else:
125+
print stringToLog
123126
sys.exit()
124127

125128
elif 'win32' in sys.platform or 'win64' in sys.platform:
@@ -133,7 +136,11 @@ def lookupAppdataFolder():
133136

134137
# Migrate existing data to the proper location if this is an existing install
135138
try:
136-
logger.info("Moving data folder to %s" % (dataFolder))
139+
stringToLog = "Moving data folder to %s" % (dataFolder)
140+
if 'logger' in globals():
141+
logger.info(stringToLog)
142+
else:
143+
print stringToLog
137144
move(path.join(environ["HOME"], ".%s" % APPNAME), dataFolder)
138145
except IOError:
139146
pass

0 commit comments

Comments
 (0)