X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifold%2Fmanifoldapi.py;h=1826ba8490a4e1d7ab3dfec9dc43b902e3554306;hb=544e6ac78d490061f848f98adb0e08574b474371;hp=c726c656f9455472d67a596327a7a8bee4848b81;hpb=50f3f9251618c6a095bfb6188e43eea7b0acae48;p=unfold.git diff --git a/manifold/manifoldapi.py b/manifold/manifoldapi.py index c726c656..1826ba84 100644 --- a/manifold/manifoldapi.py +++ b/manifold/manifoldapi.py @@ -41,7 +41,12 @@ class ManifoldAPI: ### attempt to cope with old APIs and new APIs if isinstance (result, dict) and 'code' in result: # this sounds like a result from a new API, leave it untouched - return result # jordan + # XXX jordan : we need to wrap it into a ResultValue structure + # XXX this is not good until we merge both repos + if result['code'] != 2: + return ManifoldResult(code=result['code'], value=result['result']) + else: + return ManifoldResult(code=result['code'], output=result['description']) else: if debug: print '<=== backend call', methodName, args, kwds