diff options
author | Alex Martelli <aleaxit@gmail.com> | 2006-08-24 02:58:11 (GMT) |
---|---|---|
committer | Alex Martelli <aleaxit@gmail.com> | 2006-08-24 02:58:11 (GMT) |
commit | 01c77c66289f8e9c8d15b8da623fae4014ec2edb (patch) | |
tree | f719c69719857899da42d2af8ceb48824cf4fe0d /Lib/test/test_urllibnet.py | |
parent | b5d47efe92fd12cde1de6a473108ef48238a43cc (diff) | |
download | cpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.zip cpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.tar.gz cpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.tar.bz2 |
Anna Ravenscroft identified many occurrences of "file" used to open a file
in the stdlib and changed each of them to use "open" instead. At this
time there are no other known occurrences that can be safely changed (in
Lib and all subdirectories thereof).
Diffstat (limited to 'Lib/test/test_urllibnet.py')
-rw-r--r-- | Lib/test/test_urllibnet.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index 9105afe..675184b 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -120,7 +120,7 @@ class urlretrieveNetworkTests(unittest.TestCase): file_location,info = urllib.urlretrieve("http://www.python.org/") self.assert_(os.path.exists(file_location), "file location returned by" " urlretrieve is not a valid path") - FILE = file(file_location) + FILE = open(file_location) try: self.assert_(FILE.read(), "reading from the file location returned" " by urlretrieve failed") @@ -134,7 +134,7 @@ class urlretrieveNetworkTests(unittest.TestCase): test_support.TESTFN) self.assertEqual(file_location, test_support.TESTFN) self.assert_(os.path.exists(file_location)) - FILE = file(file_location) + FILE = open(file_location) try: self.assert_(FILE.read(), "reading from temporary file failed") finally: |