From 9bf04c92d3b992bd54980abf68fa8331abfa3847 Mon Sep 17 00:00:00 2001
From: Pierre Mdawar
Date: Mon, 17 Oct 2016 14:48:47 +0300
Subject: [PATCH] [utils] initialize exceptions properly by calling the
superclass __init__
---
youtube_dl/utils.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 215f10514..fe73cc11c 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -752,6 +752,7 @@ class PostProcessingError(YoutubeDLError):
"""
def __init__(self, msg):
+ super(PostProcessingError, self).__init__(msg)
self.msg = msg
@@ -778,6 +779,9 @@ class ContentTooShortError(YoutubeDLError):
"""
def __init__(self, downloaded, expected):
+ super(ContentTooShortError, self).__init__(
+ 'Downloaded {} bytes, expected {} bytes'.format(downloaded, expected)
+ )
# Both in bytes
self.downloaded = downloaded
self.expected = expected