From 5f226a669c1666e18ef03672396452ea5f12dcde Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 3 Jun 2018 13:54:35 +0200 Subject: [PATCH] core (version): added workaround for Pyjamas, avoiding crash when reading VERSION --- sat/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sat/__init__.py b/sat/__init__.py index 76b91fcf..3a44b9c0 100644 --- a/sat/__init__.py +++ b/sat/__init__.py @@ -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'