dbapi.py
branchstable
changeset 6061 7cb29eab1c9d
parent 5863 4495b9bc49df
child 6066 953578709324
child 6252 d33509b79efe
--- a/dbapi.py	Tue Aug 03 14:43:20 2010 +0200
+++ b/dbapi.py	Wed Aug 04 10:22: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))