Make ExtractorError usable for other causes

This commit is contained in:
Philipp Hagemeister 2013-01-03 15:39:55 +01:00
parent 6e3dba168b
commit 01951dda7a
3 changed files with 13 additions and 6 deletions

View file

@ -117,7 +117,7 @@ class InfoExtractor(object):
except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
if errnote is None:
errnote = u'Unable to download webpage'
raise ExtractorError(u'%s: %s' % (errnote, compat_str(err)))
raise ExtractorError(u'%s: %s' % (errnote, compat_str(err)), sys.exc_info()[2])
class YoutubeIE(InfoExtractor):