X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fmanifoldapi.py;h=2a64a4987ca4cf97543b1d587eab9c13c48056f2;hb=65788a3e513e2ad271a49a5e56811e4ffd090fb4;hp=47cf4c989c56ac7d61c2991a8e62f223d5ad1753;hpb=d198acb2fec56c29975fbe7ecf593777791feb97;p=unfold.git diff --git a/manifold/manifoldapi.py b/manifold/manifoldapi.py index 47cf4c98..2a64a498 100644 --- a/manifold/manifoldapi.py +++ b/manifold/manifoldapi.py @@ -27,7 +27,7 @@ class ManifoldAPI: self.trace = [] self.calls = {} self.multicall = False - self.url = config.manifold_url + self.url = config.manifold_url() self.server = xmlrpclib.Server(self.url, verbose=False, allow_none=True) def __repr__ (self): return "ManifoldAPI[%s]"%self.url @@ -65,11 +65,11 @@ class ManifoldAPI: return ResultValue(**result) except Exception,error: + print "** MANIFOLD API ERROR **" if "Connection refused" in error: raise ManifoldException ( ManifoldResult (code=ManifoldCode.SERVER_UNREACHABLE, output="%s answered %s"%(self.url,error))) # otherwise - print "** MANIFOLD API ERROR **" print "====> ERROR On ManifoldAPI.%s"%methodName,"auth",self.auth,"args",args,"kwds",kwds import traceback traceback.print_exc() @@ -96,5 +96,4 @@ def execute_query(request, query): # XXX Handle errors #Error running query: {'origin': [0, 'XMLRPCAPI'], 'code': 2, 'description': 'No such session: No row was found for one()', 'traceback': 'Traceback (most recent call last):\n File "/usr/local/lib/python2.7/dist-packages/manifold/core/xmlrpc_api.py", line 68, in xmlrpc_forward\n user = Auth(auth).check()\n File "/usr/local/lib/python2.7/dist-packages/manifold/auth/__init__.py", line 245, in check\n return self.auth_method.check()\n File "/usr/local/lib/python2.7/dist-packages/manifold/auth/__init__.py", line 95, in check\n raise AuthenticationFailure, "No such session: %s" % e\nAuthenticationFailure: No such session: No row was found for one()\n', 'type': 2, 'ts': None, 'value': None} - return result['value']