Merge "Register proxy directly in add_service"
This commit is contained in:
commit
bda6e11a1b
|
@ -344,10 +344,11 @@ class Connection(six.with_metaclass(_meta.ConnectionMeta,
|
||||||
# we get an adapter.
|
# we get an adapter.
|
||||||
if isinstance(service, six.string_types):
|
if isinstance(service, six.string_types):
|
||||||
service = service_description.ServiceDescription(service)
|
service = service_description.ServiceDescription(service)
|
||||||
|
service_proxy = service._make_proxy(self)
|
||||||
|
|
||||||
# Register the proxy class with every known alias
|
# Register the proxy class with every known alias
|
||||||
for attr_name in service.all_types:
|
for attr_name in service.all_types:
|
||||||
setattr(self, attr_name.replace('-', '_'), service)
|
setattr(self, attr_name.replace('-', '_'), service_proxy)
|
||||||
|
|
||||||
def authorize(self):
|
def authorize(self):
|
||||||
"""Authorize this Connection
|
"""Authorize this Connection
|
||||||
|
|
Loading…
Reference in New Issue