summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2.py
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 21:10:48 (GMT)
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-12-18 21:10:48 (GMT)
commit0832af6628ca5ac02d0226899725297dd508470b (patch)
treefc4e7d05d9c6f51eb97f3e8abbcab2b226330b94 /Lib/test/test_urllib2.py
parentad28c7f9dad791567afa0624acfb3ba430851965 (diff)
downloadcpython-0832af6628ca5ac02d0226899725297dd508470b.zip
cpython-0832af6628ca5ac02d0226899725297dd508470b.tar.gz
cpython-0832af6628ca5ac02d0226899725297dd508470b.tar.bz2
Issue #16717: get rid of socket.error, replace with OSError
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r--Lib/test/test_urllib2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 33042ed..f296aa4 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -344,7 +344,7 @@ class MockHTTPClass:
self.data = body
if self.raise_on_endheaders:
import socket
- raise socket.error()
+ raise OSError()
def getresponse(self):
return MockHTTPResponse(MockFile(), {}, 200, "OK")
@@ -845,7 +845,7 @@ class HandlerTests(unittest.TestCase):
("Foo", "bar"), ("Spam", "eggs")])
self.assertEqual(http.data, data)
- # check socket.error converted to URLError
+ # check OSError converted to URLError
http.raise_on_endheaders = True
self.assertRaises(urllib.error.URLError, h.do_open, http, req)