resource overriden when conn_type='both' (#20206)

Simple change to avoid resource override when using conn_type == 'both'
This commit is contained in:
astro44 2017-01-25 15:19:38 -05:00 committed by Ryan Brown
parent 4a594b3702
commit d4449d082e

View file

@ -113,8 +113,8 @@ def _boto3_conn(conn_type=None, resource=None, region=None, endpoint=None, **par
client = boto3.session.Session(profile_name=profile).client(resource, region_name=region, endpoint_url=endpoint, **params)
return client
else:
resource = boto3.session.Session(profile_name=profile).resource(resource, region_name=region, endpoint_url=endpoint, **params)
client = boto3.session.Session(profile_name=profile).client(resource, region_name=region, endpoint_url=endpoint, **params)
resource = boto3.session.Session(profile_name=profile).resource(resource, region_name=region, endpoint_url=endpoint, **params)
return client, resource
boto3_inventory_conn = _boto3_conn