summaryrefslogtreecommitdiff
path: root/swiftclient/client.py
diff options
context:
space:
mode:
authorZhijunWei <wzj334965317@outlook.com>2018-12-28 23:04:37 +0800
committerZhijunWei <wzj334965317@outlook.com>2019-01-03 13:09:22 +0800
commit2ff36fde575fa6987ee5954f526ad6c9460633a5 (patch)
tree1166328403d7c4d69f5e3df8d12c159264b9e886 /swiftclient/client.py
parent4e4f57a5fc5e5f025816eb1672abfea020b208a0 (diff)
downloadpython-swiftclient-2ff36fde575fa6987ee5954f526ad6c9460633a5.tar.gz
Update hacking version
1. update hacking version to latest 2. fix pep8 failed Change-Id: Ifc3bfeff4038c93d8c8cf2c9d7814c3003e73504
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r--swiftclient/client.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index c9efc79..6a2b43b 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -248,8 +248,8 @@ def encode_meta_headers(headers):
value = encode_utf8(value)
header = header.lower()
- if (isinstance(header, six.string_types)
- and header.startswith(USER_METADATA_TYPE)):
+ if (isinstance(header, six.string_types) and
+ header.startswith(USER_METADATA_TYPE)):
header = encode_utf8(header)
ret[header] = value
@@ -706,9 +706,9 @@ def get_auth(auth_url, user, key, **kwargs):
if kwargs.get('tenant_name'):
os_options['tenant_name'] = kwargs['tenant_name']
- if not (os_options.get('tenant_name') or os_options.get('tenant_id')
- or os_options.get('project_name')
- or os_options.get('project_id')):
+ if not (os_options.get('tenant_name') or os_options.get('tenant_id') or
+ os_options.get('project_name') or
+ os_options.get('project_id')):
if auth_version in AUTH_VERSIONS_V2:
raise ClientException('No tenant specified')
raise ClientException('No project name or project id specified.')
@@ -1659,8 +1659,8 @@ class Connection(object):
self.force_auth_retry = force_auth_retry
def close(self):
- if (self.http_conn and isinstance(self.http_conn, tuple)
- and len(self.http_conn) > 1):
+ if (self.http_conn and isinstance(self.http_conn, tuple) and
+ len(self.http_conn) > 1):
conn = self.http_conn[1]
conn.close()
self.http_conn = None