diff src/__init__.py @ 861:5cefc6ab302f

server: moved APP_VERSION to common.constants + avoid __init__ import in browser side, which was the source of a crash
author Goffi <goffi@goffi.org>
date Mon, 25 Jan 2016 16:41:38 +0100
parents fd438e51bda8
children
line wrap: on
line diff
--- a/src/__init__.py	Mon Jan 25 16:39:40 2016 +0100
+++ b/src/__init__.py	Mon Jan 25 16:41:38 2016 +0100
@@ -1,3 +1,6 @@
-from server.constants import Const as C
-
-__version__ = C.APP_VERSION
+try:
+    from common.constants import Const as C
+except ImportError:
+    pass # import doesn't work at this stage with pyjamas
+else:
+    __version__ = C.APP_VERSION