summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-10-11 14:36:24 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2002-10-11 14:36:24 (GMT)
commit3bd6fde4e36bac98d9dab6060bf8791ca99929b5 (patch)
treeaaeeba195ea757df2743490ea70808d9cb7bc408 /Lib
parent549ab8a98d0d5981558660b414b9c0849d644795 (diff)
downloadcpython-3bd6fde4e36bac98d9dab6060bf8791ca99929b5.zip
cpython-3bd6fde4e36bac98d9dab6060bf8791ca99929b5.tar.gz
cpython-3bd6fde4e36bac98d9dab6060bf8791ca99929b5.tar.bz2
Use fdopen() to create file from fd.
Diffstat (limited to 'Lib')
-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