dbapi.py
changeset 8702 d47089677d44
parent 8695 358d8bed9626
child 8744 2091d275fe5c
equal deleted inserted replaced
8701:d94d3a3ba586 8702:d47089677d44
   101     loading the repository for a client, eg web server, configuration).
   101     loading the repository for a client, eg web server, configuration).
   102 
   102 
   103     The returned repository may be an in-memory repository or a proxy object
   103     The returned repository may be an in-memory repository or a proxy object
   104     using a specific RPC method, depending on the given URI (pyro or zmq).
   104     using a specific RPC method, depending on the given URI (pyro or zmq).
   105     """
   105     """
   106     try:
       
   107         return _get_repository(uri, config, vreg)
       
   108     except ConnectionError:
       
   109         raise
       
   110     except Exception as exc:
       
   111         raise ConnectionError('cause: %r' % exc)
       
   112 
       
   113 def _get_repository(uri=None, config=None, vreg=None):
       
   114     """ implements get_repository (see above) """
       
   115     if uri is None:
   106     if uri is None:
   116         return _get_inmemory_repo(config, vreg)
   107         return _get_inmemory_repo(config, vreg)
   117 
   108 
   118     protocol, hostport, appid = parse_repo_uri(uri)
   109     protocol, hostport, appid = parse_repo_uri(uri)
   119 
   110