[dbapi] Stop shadowing exceptions in get_repository() (closes #2710515)
Exceptions are already handled higher up in the stack so there's no
reason to handle them here. Furthermore, non-ConnectionError exceptions
would get hidden, making debugging harder.
--- a/dbapi.py Mon Feb 25 11:18:14 2013 +0100
+++ b/dbapi.py Mon Feb 11 11:26:08 2013 +0100
@@ -103,15 +103,6 @@
The returned repository may be an in-memory repository or a proxy object
using a specific RPC method, depending on the given URI (pyro or zmq).
"""
- try:
- return _get_repository(uri, config, vreg)
- except ConnectionError:
- raise
- except Exception as exc:
- raise ConnectionError('cause: %r' % exc)
-
-def _get_repository(uri=None, config=None, vreg=None):
- """ implements get_repository (see above) """
if uri is None:
return _get_inmemory_repo(config, vreg)