simplified manifold config (one url will do just fine)
[myslice.git] / engine / manifoldapi.py
index ebb6b4a..1001f1b 100644 (file)
@@ -11,21 +11,28 @@ class ManifoldAPI:
 
     config = Config()
     self.auth = auth
-    self.server = config.manifold_server
-    self.port = config.manifold_port
-    self.path = config.manifold_path
+#    self.server = config.manifold_server
+#    self.port = config.manifold_port
+#    self.path = config.manifold_path
     self.cainfo = cainfo
     self.errors = []
     self.trace = []
     self.calls = {}
     self.multicall = False
-    self.url = config.manifold_url()
+    self.url = config.manifold_url
     self.proxy = xmlrpclib.Server(self.url, verbose=False, allow_none=True)
 
   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