diff options
author | James Page <james.page@ubuntu.com> | 2020-03-31 16:20:22 +0100 |
---|---|---|
committer | James Page <james.page@ubuntu.com> | 2020-03-31 16:21:52 +0100 |
commit | 236a7beb3436196d5439f586fa7e9f3a171be955 (patch) | |
tree | d60b05742aba3c15357b8249f49018d855cdb19e | |
parent | 6b5a16302218400650458738899c1fcbd8f4abfd (diff) | |
download | python-glanceclient-236a7beb3436196d5439f586fa7e9f3a171be955.tar.gz |
Fix SyntaxWarning with Python 3.8
Under Python 3.8, the following SyntaxWarning is logged on every
glanceclient invocation:
SyntaxWarning: "is not" with a literal. Did you mean "!="?
if kwargs.get('cacert', None) is not '':
Make use of '!=' rather than 'is not' to avoid this warning.
Change-Id: I11ed568932ec5ea0ffee629d6fd434433f262b67
-rw-r--r-- | glanceclient/common/http.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glanceclient/common/http.py b/glanceclient/common/http.py index 78c4bc5..6973f60 100644 --- a/glanceclient/common/http.py +++ b/glanceclient/common/http.py @@ -177,7 +177,7 @@ class HTTPClient(_BaseHTTPClient): if kwargs.get('insecure', False) is True: self.session.verify = False else: - if kwargs.get('cacert', None) is not '': + if kwargs.get('cacert', None) != '': self.session.verify = kwargs.get('cacert', True) self.session.cert = (kwargs.get('cert_file'), |