core (version): added workaround for Pyjamas, avoiding crash when reading VERSION

This commit is contained in:
Goffi 2018-06-03 13:54:35 +02:00
commit 5f226a669c

View file

@ -19,5 +19,9 @@
import os.path
version_file = os.path.join(os.path.dirname(__file__), 'VERSION')
with open(version_file) as f:
__version__ = f.read().strip()
try:
with open(version_file) as f:
__version__ = f.read().strip()
except NotImplementedError:
# pyjamas workaround
__version__ = '0.7D'