summaryrefslogtreecommitdiffstats
path: root/Lib/urllib/response.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urllib/response.py')
-rw-r--r--Lib/urllib/response.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/urllib/response.py b/Lib/urllib/response.py
index 9859642..bce2287 100644
--- a/Lib/urllib/response.py
+++ b/Lib/urllib/response.py
@@ -33,12 +33,15 @@ class addbase(object):
id(self), self.fp)
def close(self):
+ if self.fp:
+ self.fp.close()
+ self.fp = None
self.read = None
self.readline = None
self.readlines = None
self.fileno = None
- if self.fp: self.fp.close()
- self.fp = None
+ self.__iter__ = None
+ self.__next__ = None
def __enter__(self):
if self.fp is None: