The cause seems to be that when a file URL doesn't exist,
urllib.urlopen() raises OSError instead of IOError. Simply add this
to the except clause. Not elegant, but effective. :-)
rp.set_url(url)
try:
rp.read()
- except IOError, msg:
+ except (OSError, IOError), msg:
self.note(1, "I/O error parsing %s: %s", url, msg)
def run(self):
url, fragment = url_pair
try:
return self.urlopener.open(url)
- except IOError, msg:
+ except (OSError, IOError), msg:
msg = self.sanitize(msg)
self.note(0, "Error %s", msg)
if self.verbose > 0: