Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
solves #33
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Frasca authored and Mario Frasca committed Jan 30, 2015
1 parent 67fde23 commit 1a57c9d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions bauble/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"""
import os
import sys
from bauble.i18n import _


def main_is_frozen():
Expand Down Expand Up @@ -82,8 +81,8 @@ def user_dir():
d = os.path.join(os.environ['USERPROFILE'], 'Application Data',
'Bauble')
else:
raise Exception(_('Could not get path for user settings: no '
'APPDATA or USERPROFILE variable'))
raise Exception('Could not get path for user settings: no '
'APPDATA or USERPROFILE variable')
elif sys.platform == "linux2":
# using os.expanduser is more reliable than os.environ['HOME']
# because if the user runs bauble with sudo then it will
Expand All @@ -92,12 +91,12 @@ def user_dir():
d = os.path.join(os.path.expanduser('~%s' % os.environ['USER']),
'.bauble')
except Exception:
raise Exception(_('Could not get path for user settings: '
'could not expand $HOME for user %(username)s' %
dict(username=os.environ['USER'])))
raise Exception('Could not get path for user settings: '
'could not expand $HOME for user %(username)s' %
dict(username=os.environ['USER']))
else:
raise Exception(_('Could not get path for user settings: '
'unsupported platform'))
raise Exception('Could not get path for user settings: '
'unsupported platform')
return os.path.abspath(d)


Expand Down

0 comments on commit 1a57c9d

Please sign in to comment.