Fixes TypeError in Client constructor

When both session and artifacts_client parameters were
passed to the Client a TypeError exception was raised
because artifacts_client wan't removed from kwargs
and SessionClient doesn't expect this parameter

Change-Id: Ie4accbc363b0cfcb79bfa35529e0bb4c524633fe
Closes-Bug: #1543086
This commit is contained in:
Stan Lagun 2016-02-08 15:22:31 +03:00
parent ee33aa40d4
commit 60ae95d5db
1 changed files with 1 additions and 1 deletions

View File

@ -39,6 +39,7 @@ class Client(object):
"""Initialize a new client for the Murano v1 API."""
self.glance_client = kwargs.pop('glance_client', None)
tenant = kwargs.pop('tenant', None)
artifacts_client = kwargs.pop('artifacts_client', None)
self.http_client = http._construct_http_client(*args, **kwargs)
self.environments = environments.EnvironmentManager(self.http_client)
self.env_templates = templates.EnvTemplateManager(self.http_client)
@ -49,7 +50,6 @@ class Client(object):
request_statistics.RequestStatisticsManager(self.http_client)
self.instance_statistics = \
instance_statistics.InstanceStatisticsManager(self.http_client)
artifacts_client = kwargs.pop('artifacts_client', None)
pkg_mgr = packages.PackageManager(self.http_client)
if artifacts_client:
artifact_repo = artifact_packages.ArtifactRepo(artifacts_client,