From e19a2f863193e0385458157a840ecbae205e7434 Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Wed, 10 Jan 2018 23:19:29 -0200 Subject: [PATCH 1/3] Introduce a base exception class --- pydub/exceptions.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/pydub/exceptions.py b/pydub/exceptions.py index 0a876ca0..8f0ac4a9 100644 --- a/pydub/exceptions.py +++ b/pydub/exceptions.py @@ -1,26 +1,30 @@ +class PydubException(Exception): + """ + Base class for any Pydub exception + """ -class TooManyMissingFrames(Exception): +class TooManyMissingFrames(PydubException): pass -class InvalidDuration(Exception): +class InvalidDuration(PydubException): pass -class InvalidTag(Exception): +class InvalidTag(PydubException): pass -class InvalidID3TagVersion(Exception): +class InvalidID3TagVersion(PydubException): pass -class CouldntDecodeError(Exception): +class CouldntDecodeError(PydubException): pass - -class CouldntEncodeError(Exception): + +class CouldntEncodeError(PydubException): pass -class MissingAudioParameter(Exception): - pass \ No newline at end of file +class MissingAudioParameter(PydubException): + pass From 205324a8fdc9742688952421ed5646877f66f583 Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Wed, 10 Jan 2018 23:19:48 -0200 Subject: [PATCH 2/3] Add blank lines to comply with PEP8 --- pydub/exceptions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pydub/exceptions.py b/pydub/exceptions.py index 8f0ac4a9..79d07436 100644 --- a/pydub/exceptions.py +++ b/pydub/exceptions.py @@ -23,8 +23,10 @@ class InvalidID3TagVersion(PydubException): class CouldntDecodeError(PydubException): pass + class CouldntEncodeError(PydubException): pass + class MissingAudioParameter(PydubException): pass From 042253ac0f149ebbcc8ee3d7a24e25f71e252d24 Mon Sep 17 00:00:00 2001 From: Evandro Myller Date: Wed, 10 Jan 2018 23:32:51 -0200 Subject: [PATCH 3/3] Add @emyller to AUTHORS --- AUTHORS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index 2ee3a2f4..74b82218 100644 --- a/AUTHORS +++ b/AUTHORS @@ -66,3 +66,6 @@ Marcio Mazza Sungsu Lim github: proflim + +Evandro Myller + github: emyller