workaround for pyinstaller on win32

Este commit está contenido en:
Felix Lohmeier 2019-08-22 03:02:32 +02:00
padre d22022e273
commit 7b657eb76e
Se han modificado 1 ficheros con 5 adiciones y 1 borrados

Ver fichero

@ -22,10 +22,14 @@ import sys
from google.refine import __main__, cli, refine
# workaround für pyinstaller
# workaround for pyinstaller
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
reload(sys)
sys.setdefaultencoding('utf-8')
if sys.platform == "win32":
import codecs
codecs.register(lambda name: codecs.lookup(
'utf-8') if name == 'cp65001' else None)
if __name__ == '__main__':
__main__.main()