diff options
author | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2010-04-20 17:26:29 +0200 |
---|---|---|
committer | Sylvain Th?nault <sylvain.thenault@logilab.fr> | 2010-04-20 17:26:29 +0200 |
commit | 65bb2719e4ea1389fedbfae82d46a86c8c942ded (patch) | |
tree | 987ecb8c79ff4a1e59d4794b8059f4c38f068c5c | |
parent | 4c6e81175d8c9172fe989f207656813da1634452 (diff) | |
download | logilab-common-65bb2719e4ea1389fedbfae82d46a86c8c942ded.tar.gz |
pyro_ext: raise PyroError instead of exception
-rw-r--r-- | pyro_ext.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pyro_ext.py b/pyro_ext.py index 9b2fa97..eb001bc 100644 --- a/pyro_ext.py +++ b/pyro_ext.py @@ -113,12 +113,12 @@ def ns_get_proxy(nsid, defaultnsgroup=_MARKER, nshost=None): nsd = locate_ns(nshost) pyrouri = nsd.resolve('%s.%s' % (nsgroup, nsid)) except errors.ProtocolError, ex: - raise Exception('Could not connect to the Pyro name server (host: %s)' - % nshost) + raise errors.PyroError( + 'Could not connect to the Pyro name server (host: %s)' % nshost) except errors.NamingError: - raise Exception('Could not get proxy for %s (not registered in Pyro), ' - 'you may have to restart your server-side application' - % nsid) + raise errors.PyroError( + 'Could not get proxy for %s (not registered in Pyro), ' + 'you may have to restart your server-side application' % nsid) return core.getProxyForURI(pyrouri) |