summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/urllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index f098b5d..4dd76df 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -223,7 +223,7 @@ class URLopener:
suffix = os.path.splitext(path)[1]
(fd, filename) = tempfile.mkstemp(suffix)
self.__tempfiles.append(filename)
- tfp = os.open(fd, 'wb')
+ tfp = os.fdopen(fd, 'wb')
result = filename, headers
if self.tempcache is not None:
self.tempcache[url] = result