1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-13 13:47:16 +08:00

[utils] initialize exceptions properly by calling the superclass __init__

This commit is contained in:
Pierre Mdawar 2016-10-17 14:48:47 +03:00
parent 60073843ba
commit 9bf04c92d3

View File

@ -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