show manifold server URL in auth page
[myslice.git] / engine / manifold_api.py
index 63487b9..c166bd8 100644 (file)
@@ -1,25 +1,22 @@
 # Manifold API Python interface
 import xmlrpclib
-#from util.config import Config
+from myslice.config import Config
 
 class ManifoldAPI:
 
   def __init__(self, auth=None, cainfo=None):
 
-    #config = Config()
+    config = Config()
     self.auth = auth
-    #self.server = config.server
-    #self.port = config.port
-    #self.path = config.path
-    self.server = 'demo.myslice.info'
-    self.port = '7080'
-    self.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 = "http://"+self.server+":"+self.port+"/"
+    self.url = config.manifold_url()
     self.proxy = xmlrpclib.Server(self.url, verbose=False, allow_none=True)
 
   def __getattr__(self, methodName):
@@ -27,4 +24,4 @@ class ManifoldAPI:
            print methodName, self.auth, self.url
            result=getattr(self.proxy, methodName)(self.auth, *args, **kwds)
            return result
-      return func
\ No newline at end of file
+      return func