From 02b08aaa10b3655aee95e6069b5116db0524a268 Mon Sep 17 00:00:00 2001 From: Timur Alperovich Date: Mon, 22 Jan 2018 18:22:04 -0800 Subject: [PATCH] Add close() to _RetryBody. Allows clients to give up on reading the rest of the server response, if they so choose. Change-Id: Iccc95b1b5e7d066470966ee0c62a3beb260846e5 --- swiftclient/client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/swiftclient/client.py b/swiftclient/client.py index 8cbdf452..8d28ffb6 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): """