[utils] initialize exceptions properly by calling the superclass __init__
This commit is contained in:
parent
60073843ba
commit
9bf04c92d3
@ -752,6 +752,7 @@ class PostProcessingError(YoutubeDLError):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, msg):
|
def __init__(self, msg):
|
||||||
|
super(PostProcessingError, self).__init__(msg)
|
||||||
self.msg = msg
|
self.msg = msg
|
||||||
|
|
||||||
|
|
||||||
@ -778,6 +779,9 @@ class ContentTooShortError(YoutubeDLError):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, downloaded, expected):
|
def __init__(self, downloaded, expected):
|
||||||
|
super(ContentTooShortError, self).__init__(
|
||||||
|
'Downloaded {} bytes, expected {} bytes'.format(downloaded, expected)
|
||||||
|
)
|
||||||
# Both in bytes
|
# Both in bytes
|
||||||
self.downloaded = downloaded
|
self.downloaded = downloaded
|
||||||
self.expected = expected
|
self.expected = expected
|
||||||
|
Loading…
x
Reference in New Issue
Block a user