import sys, codecs
import unittest, re
+from httplib import HTTPException
from test import test_support
from StringIO import StringIO
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):
from test.test_support import run_unittest, open_urlresource
import unittest
+from httplib import HTTPException
import sys
import os
from unicodedata import normalize, unidata_version
# Hit the exception early
try:
open_urlresource(TESTDATAURL)
- except IOError:
+ except (IOError, HTTPException):
self.skipTest("Could not retrieve " + TESTDATAURL)
for line in open_urlresource(TESTDATAURL):
if '#' in line: