# HG changeset patch # User Adrien Di Mascio # Date 1248424617 -7200 # Node ID c4ccfd38a5427dc8fee870abd6f66de15155720f # Parent cc18a700a2be1e657d86fe6004b1db0ba50ee15c [server] take a chance to grab base-url from all-in-one config if not specified explicitly diff -r cc18a700a2be -r c4ccfd38a542 server/session.py --- a/server/session.py Fri Jul 24 09:31:43 2009 +0200 +++ b/server/session.py Fri Jul 24 10:36:57 2009 +0200 @@ -194,7 +194,14 @@ raise KeyError(eid) def base_url(self): - return self.repo.config['base-url'] or u'' + url = self.repo.config['base-url'] + if not url: + try: + url = self.repo.config.default_base_url() + except AttributeError: # default_base_url() might not be available + self.warning('missing base-url definition in server config') + url = u'' + return url def from_controller(self): """return the id (string) of the controller issuing the request (no