# HG changeset patch # User souliane # Date 1398936711 -7200 # Node ID 73f767a9ac2f4678c4acadd67746e1dae62ecb56 # Parent e63fc04efef793eb2ed06e44f38a37e186c75438 server_side: added constant SERVICE_PROFILE to remove hard-coded value diff -r e63fc04efef7 -r 73f767a9ac2f constants.py --- a/constants.py Tue May 06 18:06:38 2014 +0200 +++ b/constants.py Thu May 01 11:31:51 2014 +0200 @@ -24,6 +24,7 @@ class Const(constants.Const): APP_NAME = 'Libervia' + SERVICE_PROFILE = 'libervia' # the SàT profile that is used for exporting the service TIMEOUT = 300 # Session's time out, after that the user will be disconnected LIBERVIA_DIR = "output/" diff -r e63fc04efef7 -r 73f767a9ac2f libervia_server/blog.py --- a/libervia_server/blog.py Tue May 06 18:06:38 2014 +0200 +++ b/libervia_server/blog.py Thu May 01 11:31:51 2014 +0200 @@ -48,8 +48,9 @@ def __init__(self, host): self.host = host Resource.__init__(self) - if not host.bridge.isConnected("libervia"): # FIXME: hard coded value for test - host.bridge.connect("libervia") + # FIXME: this can be move to the beginning of Libervia.startService to avoid an initialization issue + if not host.bridge.isConnected(C.SERVICE_PROFILE): + host.bridge.connect(C.SERVICE_PROFILE) def render_GET(self, request): if not request.postpath: