fix: import-time side effect on errors
A subtle module mismatch occurs when importing: from marconiclient.transport import errors This actually brings in marconiclient.errors, rather than the expected marconiclient.transport.errors. This patch addresses the issue, which was caused by import-time side effects in marconiclient.transport.__init__. Change-Id: I2209193fc81099b1af3e0fc174b254cdfcfc619a
This commit is contained in:
parent
f99c3f9977
commit
3c32c6894b
@ -18,7 +18,7 @@ import six
|
||||
from six.moves.urllib import parse
|
||||
from stevedore import driver
|
||||
|
||||
from marconiclient import errors
|
||||
from marconiclient import errors as _errors
|
||||
|
||||
_TRANSPORT_OPTIONS = [
|
||||
cfg.StrOpt('default_transport', default='http',
|
||||
@ -51,7 +51,7 @@ def get_transport(conf, transport, version=1):
|
||||
invoke_on_load=True,
|
||||
invoke_args=[conf])
|
||||
except RuntimeError as ex:
|
||||
raise errors.DriverLoadFailure(entry_point, ex)
|
||||
raise _errors.DriverLoadFailure(entry_point, ex)
|
||||
|
||||
return mgr.driver
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user