diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index b832fc9b2d8..3f8dcfb151d 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1487,7 +1487,6 @@ class FileHandler(BaseHandler): origurl = 'file://' + filename return addinfourl(open(localfile, 'rb'), headers, origurl) except OSError as exp: - # users shouldn't expect OSErrors coming from urlopen() raise URLError(exp) raise URLError('file not on local host')