X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fmanifoldapi.py;h=cc38ba74e777e13213bdf1b1ca9b8d69d88591ef;hb=2f1347ac1031c64b93c0b397add527ef33948974;hp=14eef3bed707a7afec1dd68cbe836a85fe159fdb;hpb=505d063036e7827a8654d4efe89f56a878d86494;p=unfold.git diff --git a/manifold/manifoldapi.py b/manifold/manifoldapi.py index 14eef3be..cc38ba74 100644 --- a/manifold/manifoldapi.py +++ b/manifold/manifoldapi.py @@ -40,7 +40,7 @@ class ManifoldAPI: def __getattr__(self, methodName): def func(*args, **kwds): try: - if debug: print "====> ManifoldAPI.%s"%methodName,"args",args,"kwds",kwds + if debug: print "====> ManifoldAPI.%s"%methodName,"auth",self.auth,"args",args,"kwds",kwds result=getattr(self.server, methodName)(self.auth, *args, **kwds) if debug: print '<==== backend call %s(*%s,**%s) returned'%(methodName,args,kwds), @@ -53,7 +53,7 @@ class ManifoldAPI: # minimal treatment is required, but we do want to turn this into a # class instance if result['code'] != 2: # in the manifold world, this can be either - # 0 (ok) 1 (partial result) or 2 which means error + # 0 (ok) 1 (partial result) or 2 (which means error) if debug: print "OK (new API)" return ManifoldResult(code=result['code'], value=result['value']) else: @@ -73,6 +73,8 @@ class ManifoldAPI: if debug: print "KO (old API - 8002) - raising ManifoldException" reason="most likely your session has expired" reason += " (the manifold API has no unambiguous error reporting mechanism yet)" + import traceback + traceback.print_exc() raise ManifoldException ( ManifoldResult (code=ManifoldCode.SESSION_EXPIRED, output=reason)) else: if debug: print "KO (old API - other) - raising ManifoldException"