dbapi.py
branchstable
changeset 7134 01544b6d98fa
parent 7085 36e91d19188b
child 7140 ba51dac1115d
--- a/dbapi.py	Tue Mar 29 09:02:49 2011 +0200
+++ b/dbapi.py	Tue Mar 29 08:47:09 2011 +0200
@@ -102,11 +102,14 @@
         return Repository(config, vreg=vreg)
     else: # method == 'pyro'
         # resolve the Pyro object
-        from logilab.common.pyro_ext import ns_get_proxy
+        from logilab.common.pyro_ext import ns_get_proxy, get_proxy
         pyroid = database or config['pyro-instance-id'] or config.appid
         try:
-            return ns_get_proxy(pyroid, defaultnsgroup=config['pyro-ns-group'],
-                                nshost=config['pyro-ns-host'])
+            if config['pyro-ns-host'] == 'NO_PYRONS':
+                return get_proxy(pyroid)
+            else:
+                return ns_get_proxy(pyroid, defaultnsgroup=config['pyro-ns-group'],
+                                    nshost=config['pyro-ns-host'])
         except Exception, ex:
             raise ConnectionError(str(ex))