dbapi.py
changeset 6066 953578709324
parent 6013 8ca424bc393b
parent 6061 7cb29eab1c9d
child 6142 8bc6eac1fac1
--- a/dbapi.py	Mon Aug 02 15:37:45 2010 +0200
+++ b/dbapi.py	Wed Aug 04 11:13:11 2010 +0200
@@ -100,9 +100,9 @@
     else: # method == 'pyro'
         # resolve the Pyro object
         from logilab.common.pyro_ext import ns_get_proxy
+        pyroid = database or config['pyro-instance-id'] or config.appid
         try:
-            return ns_get_proxy(database,
-                                defaultnsgroup=config['pyro-ns-group'],
+            return ns_get_proxy(pyroid, defaultnsgroup=config['pyro-ns-group'],
                                 nshost=config['pyro-ns-host'])
         except Exception, ex:
             raise ConnectionError(str(ex))