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:
parent
60073843ba
commit
9bf04c92d3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user