diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-11-17 10:38:25 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-11-17 10:38:25 +0000 |
commit | 7412e0b043198220769b726f31ee9d6f68109ebd (patch) | |
tree | 93baf5d3c79ceefea05ff25aa53b7a6f5e3c71c3 /saharaclient/api | |
parent | dd0d64cdcefa791ab603f4d7c08ba7d1d3836c08 (diff) | |
parent | 29a8eacf02c3e67fe70041748d8425350f495ce1 (diff) | |
download | python-saharaclient-7412e0b043198220769b726f31ee9d6f68109ebd.tar.gz |
Merge "Enabling DeprecationWarning if session is not provided"
Diffstat (limited to 'saharaclient/api')
-rw-r--r-- | saharaclient/api/client.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/saharaclient/api/client.py b/saharaclient/api/client.py index f7ffab3..0343a7c 100644 --- a/saharaclient/api/client.py +++ b/saharaclient/api/client.py @@ -74,10 +74,12 @@ class Client(object): insecure=False, cacert=None, region_name=None, **kwargs): if not session: + warnings.simplefilter('once', category=DeprecationWarning) warnings.warn('Passing authentication parameters to saharaclient ' 'is deprecated. Please construct and pass an ' 'authenticated session object directly.', DeprecationWarning) + warnings.resetwarnings() if input_auth_token: auth = token_endpoint.Token(sahara_url, input_auth_token) |