Fix config pyfaPath handling

This commit is contained in:
cncfanatics
2011-01-20 22:40:55 +01:00
parent 2b0950a9e5
commit b082a6acec

View File

@@ -14,7 +14,8 @@ expansionVersion = "1.1.0"
# The main pyfa directory which contains run.py
# Python 2.X uses ANSI by default, so we need to convert the character encoding
pyfaPath = unicode(os.path.dirname(os.path.abspath(sys.modules['__main__'].__file__)), sys.getfilesystemencoding())
if hasattr(sys.modules['__main__'], '__file__'):
pyfaPath = unicode(os.path.dirname(os.path.abspath(sys.modules['__main__'].__file__)), sys.getfilesystemencoding())
# Where we store the saved fits etc, default is the current users home directory
savePath = unicode(os.path.expanduser(os.path.join("~", ".pyfa")), sys.getfilesystemencoding())