From eb3185d6a3612d4bbf5ce4f14d0319dd4de9ed32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 5 Sep 2018 18:15:33 +0200 Subject: [PATCH] update exception hierarchy --- gallery_dl/exception.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gallery_dl/exception.py b/gallery_dl/exception.py index 8feb8325..3e86177c 100644 --- a/gallery_dl/exception.py +++ b/gallery_dl/exception.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2015-2017 Mike Fährmann +# Copyright 2015-2018 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -18,7 +18,8 @@ Exception | +-- NotFoundError | +-- HttpError +-- DownloadError - +-- DownloadComplete + | +-- DownloadComplete + | +-- DownloadRetry +-- NoExtractorError +-- FormatError +-- FilterError @@ -50,11 +51,15 @@ class HttpError(ExtractionError): """HTTP request during extraction failed""" -class DownloadRetry(GalleryDLException): +class DownloadError(GalleryDLException): + """Base class for exceptions during file downloads""" + + +class DownloadRetry(DownloadError): """Download attempt failed and should be retried""" -class DownloadComplete(GalleryDLException): +class DownloadComplete(DownloadError): """Output file of attempted download is already complete"""