Introduced Trouble(Exception) for more elegant non-fatal errors handling

This commit is contained in:
Filippo Valsorda 2012-05-09 09:41:34 +00:00 committed by Filippo Valsorda
parent 3fe294e4ef
commit 0b8c922da9
2 changed files with 30 additions and 24 deletions

View file

@ -290,6 +290,13 @@ class ContentTooShortError(Exception):
self.expected = expected
class Trouble(Exception):
"""Trouble helper exception
This is an exception to be handled with
FileDownloader.trouble
"""
class YoutubeDLHandler(urllib2.HTTPHandler):
"""Handler for HTTP requests and responses.