# HG changeset patch # User Goffi # Date 1453736498 -3600 # Node ID 5cefc6ab302f091c89ea7a717ee8808fed76df32 # Parent 05cd9dc775e62489f44b4473ad276c518b1a5ab6 server: moved APP_VERSION to common.constants + avoid __init__ import in browser side, which was the source of a crash diff -r 05cd9dc775e6 -r 5cefc6ab302f src/__init__.py --- 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 diff -r 05cd9dc775e6 -r 5cefc6ab302f src/common/constants.py --- a/src/common/constants.py Mon Jan 25 16:39:40 2016 +0100 +++ b/src/common/constants.py Mon Jan 25 16:41:38 2016 +0100 @@ -23,6 +23,9 @@ class Const(constants.Const): + # XXX: we don't want to use the APP_VERSION inherited from sat.core.constants version + # as we use this version to check that there is not a mismatch with backend + APP_VERSION = u'0.6.0D' # Please add 'D' at the end for dev versions LIBERVIA_MAIN_PAGE = "libervia.html" # MISC diff -r 05cd9dc775e6 -r 5cefc6ab302f src/server/constants.py --- a/src/server/constants.py Mon Jan 25 16:39:40 2016 +0100 +++ b/src/server/constants.py Mon Jan 25 16:41:38 2016 +0100 @@ -24,9 +24,6 @@ APP_NAME = 'Libervia' APP_NAME_FILE = "libervia" - # XXX: we don't want to use the APP_VERSION inherited from sat.core.constants version - # as we use this version to check that there is not a mismatch with backend - APP_VERSION = u'0.6.0D' # Please add 'D' at the end for dev versions SERVICE_PROFILE = 'libervia' # the SàT profile that is used for exporting the service SESSION_TIMEOUT = 300 # Session's timeout, after that the user will be disconnected