summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimur Alperovich <timuralp@swiftstack.com>2018-01-22 18:22:04 -0800
committerTimur Alperovich <timur@timuralp.com>2018-07-20 12:31:06 -0700
commit02b08aaa10b3655aee95e6069b5116db0524a268 (patch)
tree45fe4b0be195c378a35e436cae9ffb79a9922204
parent23d29eda8d03785c22d67930e21a0ba4098ba23c (diff)
downloadpython-swiftclient-02b08aaa10b3655aee95e6069b5116db0524a268.tar.gz
Add close() to _RetryBody.
Allows clients to give up on reading the rest of the server response, if they so choose. Change-Id: Iccc95b1b5e7d066470966ee0c62a3beb260846e5
-rw-r--r--swiftclient/client.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/swiftclient/client.py b/swiftclient/client.py
index 8cbdf45..8d28ffb 100644
--- a/swiftclient/client.py
+++ b/swiftclient/client.py
@@ -273,6 +273,9 @@ class _ObjectBody(object):
def __next__(self):
return self.next()
+ def close(self):
+ self.resp.close()
+
class _RetryBody(_ObjectBody):
"""