diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-12-03 01:30:48 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-12-03 01:30:48 +0000 |
commit | e100fd28ab9ea58100bc972750889ec434ad4e9f (patch) | |
tree | bf0d01435fc72689c3eefb22619bfee9fdb02b01 /swiftclient/client.py | |
parent | dbc6686b5ea4129e7bc8e41dd7f8f8313c179fbd (diff) | |
parent | 9b7e24c4499c248995d09ea99b46d1678f7a3afb (diff) | |
download | python-swiftclient-e100fd28ab9ea58100bc972750889ec434ad4e9f.tar.gz |
Merge "Fix download bandwidth for swift command."
Diffstat (limited to 'swiftclient/client.py')
-rw-r--r-- | swiftclient/client.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py index f8ba3d0..1653b04 100644 --- a/swiftclient/client.py +++ b/swiftclient/client.py @@ -26,7 +26,7 @@ from functools import wraps from urllib import quote as _quote from urlparse import urlparse, urlunparse from httplib import HTTPException, HTTPConnection, HTTPSConnection -from time import sleep +from time import sleep, time from swiftclient.exceptions import ClientException, InvalidHeadersException @@ -1071,6 +1071,7 @@ class Connection(object): self.cacert = cacert self.insecure = insecure self.ssl_compression = ssl_compression + self.auth_end_time = 0 def close(self): if self.http_conn and type(self.http_conn) is tuple\ @@ -1112,6 +1113,7 @@ class Connection(object): if not self.url or not self.token: self.url, self.token = self.get_auth() self.http_conn = None + self.auth_end_time = time() if not self.http_conn: self.http_conn = self.http_connection() kwargs['http_conn'] = self.http_conn |