debug & renamings
[unfold.git] / engine / manifoldapi.py
index 40b95c1..111241c 100644 (file)
@@ -25,17 +25,22 @@ class ManifoldAPI:
   def __getattr__(self, methodName):
       def func(*args, **kwds):
         result=getattr(self.proxy, methodName)(self.auth, *args, **kwds)
-        if debug: print '===> backend call',methodName, self.auth, self.url,'->',result
+        ### debug
+        if debug:
+          print '===> backend call',methodName, self.auth, self.url,'->',
+          if not result:                        print "no/empty result"
+          elif isinstance (result,str):         print "result is '%s'"%result
+          elif isinstance (result,list):        print "result is a %d-elts list"%len(result)
+          else:                                 print "dont know how to display result"
+        ###
         return result
       return func
 
   # 4amine : xxx
   def send_manifold_query (self, manifold_query):
-    (action,method)= (raw_query.action,raw_query.method)
+    (action,method)= (manifold_query.action,manifold_query.method)
     if action=='get':
-      return self.Get(method,
-                      # need to fill in the other args here
-                      )
+      return self.proxy.Get(self.auth, method, manifold_query.filters, {}, manifold_query.fields)
     # xxx...
     elif action=='others':
       return None