From 0b8c922da91fb7238ea15434d6a4792da84015bf Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Wed, 9 May 2012 09:41:34 +0000 Subject: Introduced Trouble(Exception) for more elegant non-fatal errors handling --- youtube_dl/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'youtube_dl/utils.py') diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 6e982157c..d18073d72 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -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. -- cgit v1.2.3