From 2b94cc9bae85b02ce0d63f4263239f0f99c4e553 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh <bryan.tongminh@gmail.com> Date: Wed, 6 Feb 2008 09:33:44 +0000 Subject: [PATCH] add close method to HTTPPool --- mwclient/http.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mwclient/http.py b/mwclient/http.py index 96198f0..d9ca695 100644 --- a/mwclient/http.py +++ b/mwclient/http.py @@ -188,4 +188,7 @@ class HTTPPool(list): def request(self, method, host, path, headers, data, stream_iter, raise_on_not_ok, auto_redirect): return self.find_connection(host).request(method, host, path, - headers, data, stream_iter, raise_on_not_ok, auto_redirect) \ No newline at end of file + headers, data, stream_iter, raise_on_not_ok, auto_redirect) + def close(self): + for hosts, conn in self: + conn.close() \ No newline at end of file -- GitLab