mirror of
https://github.com/python/cpython.git
synced 2025-09-18 06:30:38 +00:00
When open_urlresource() fails, HTTPException is another possible error
This commit is contained in:
parent
0306894fb1
commit
2dab865ff1
2 changed files with 4 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
import sys, codecs
|
||||
import unittest, re
|
||||
from httplib import HTTPException
|
||||
from test import test_support
|
||||
from StringIO import StringIO
|
||||
|
||||
|
@ -268,7 +269,7 @@ class TestBase_Mapping(unittest.TestCase):
|
|||
unittest.TestCase.__init__(self, *args, **kw)
|
||||
try:
|
||||
self.open_mapping_file() # test it to report the error early
|
||||
except IOError:
|
||||
except (IOError, HTTPException):
|
||||
self.skipTest("Could not retrieve "+self.mapfileurl)
|
||||
|
||||
def open_mapping_file(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue