# HG changeset patch # User RĂ©mi Cardona # Date 1360578368 -3600 # Node ID d47089677d44155ddbd44fa02ae09c21f363d6d3 # Parent d94d3a3ba5866d0c7348b612b0f63e79a3a8804b [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. diff -r d94d3a3ba586 -r d47089677d44 dbapi.py --- 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)