Mercurial > libervia-backend
diff sat/__init__.py @ 2607:4c086cf7af66
core (version): added workaround for Pyjamas, avoiding crash when reading VERSION
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 03 Jun 2018 13:54:35 +0200 |
parents | 4aca060075b7 |
children | 56f94936df1e |
line wrap: on
line diff
--- a/sat/__init__.py Sat Jun 02 17:29:55 2018 +0200 +++ b/sat/__init__.py Sun Jun 03 13:54:35 2018 +0200 @@ -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'