From 7c0f3979a4a5ac282a5b1abd68c514e7e136698d Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 18 Feb 2020 00:23:57 -0800 Subject: [PATCH] Add a parent SpinalException class. --- voussoirkit/spinal.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/voussoirkit/spinal.py b/voussoirkit/spinal.py index 5ed0804..49f38a2 100644 --- a/voussoirkit/spinal.py +++ b/voussoirkit/spinal.py @@ -17,25 +17,28 @@ CHUNK_SIZE = 2 * bytestring.MIBIBYTE HASH_CLASS = hashlib.md5 -class DestinationIsDirectory(Exception): +class SpinalException(Exception): pass -class DestinationIsFile(Exception): +class DestinationIsDirectory(SpinalException): pass -class RecursiveDirectory(Exception): +class DestinationIsFile(SpinalException): pass -class SourceNotDirectory(Exception): +class RecursiveDirectory(SpinalException): pass -class SourceNotFile(Exception): +class SourceNotDirectory(SpinalException): pass -class SpinalError(Exception): +class SourceNotFile(SpinalException): pass -class ValidationError(Exception): +class SpinalError(SpinalException): + pass + +class ValidationError(SpinalException): pass def callback_exclusion_v1(name, path_type):