diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-10-11 14:36:24 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2002-10-11 14:36:24 (GMT) |
commit | 3bd6fde4e36bac98d9dab6060bf8791ca99929b5 (patch) | |
tree | aaeeba195ea757df2743490ea70808d9cb7bc408 /Lib/urllib.py | |
parent | 549ab8a98d0d5981558660b414b9c0849d644795 (diff) | |
download | cpython-3bd6fde4e36bac98d9dab6060bf8791ca99929b5.zip cpython-3bd6fde4e36bac98d9dab6060bf8791ca99929b5.tar.gz cpython-3bd6fde4e36bac98d9dab6060bf8791ca99929b5.tar.bz2 |
Use fdopen() to create file from fd.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 2 |
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 |