]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Also check for `sys._MEIPASS` before assuming PyInstallerness (#526)
authorAarni Koskela <akx@iki.fi>
Thu, 14 Sep 2017 09:47:05 +0000 (12:47 +0300)
committerGitHub <noreply@github.com>
Thu, 14 Sep 2017 09:47:05 +0000 (12:47 +0300)
Fixes #525

babel/localedata.py

index ae21547812b0404e22f2ea9ff0b0b74c66cb4a5f..4b6d3b68ae60dd0a504d178d18562ff8e614f2cc 100644 (file)
@@ -22,7 +22,7 @@ from babel._compat import pickle, string_types
 
 
 def get_base_dir():
-    if getattr(sys, 'frozen', False):
+    if getattr(sys, 'frozen', False) and getattr(sys, '_MEIPASS', None):
         # we are running in a |PyInstaller| bundle
         basedir = sys._MEIPASS
     else: