OS X distributive was pointing to the wrong path for the pyfa root, due to the executable being in a different place than the actual root. This changes the logic to use sys.executable as a fallback when __file__ doesn't exist (for example in the windows distributive)
This commit is contained in:
@@ -51,7 +51,7 @@ def isFrozen():
|
||||
return False
|
||||
|
||||
def getPyfaRoot():
|
||||
base = sys.executable if isFrozen() else sys.argv[0]
|
||||
base = getattr(sys.modules['__main__'], "__file__", sys.executable) if isFrozen() else sys.argv[0]
|
||||
root = os.path.dirname(os.path.realpath(os.path.abspath(base)))
|
||||
root = unicode(root, sys.getfilesystemencoding())
|
||||
return root
|
||||
|
||||
Reference in New Issue
Block a user