aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo.valsorda@gmail.com>2012-05-09 09:41:34 +0000
committerFilippo Valsorda <filosottile@ip-10-58-141-254.eu-west-1.compute.internal>2012-05-09 09:43:11 +0000
commit0b8c922da91fb7238ea15434d6a4792da84015bf (patch)
tree92e39c5f122739b8ffa5d89acedd12432251d916 /youtube_dl/utils.py
parent3fe294e4ef96317c61398707ed65a9e3f1c281c4 (diff)
Introduced Trouble(Exception) for more elegant non-fatal errors handling
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py7
1 files changed, 7 insertions, 0 deletions
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.