From 243a728d6cbd71505f4fe36bcda2c4bf9c640bf1 Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Tue, 13 Jul 2021 07:56:54 -0400 Subject: [PATCH] Move DownloadError into ubuntutools/misc --- ubuntutools/archive.py | 11 +++++------ ubuntutools/misc.py | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ubuntutools/archive.py b/ubuntutools/archive.py index 76b4c66..6c6b20b 100644 --- a/ubuntutools/archive.py +++ b/ubuntutools/archive.py @@ -52,18 +52,17 @@ from ubuntutools.lp.udtexceptions import (PackageNotFoundException, SeriesNotFoundException, PocketDoesNotExistError, InvalidDistroValueError) -from ubuntutools.misc import (download, download_text, verify_file_checksum, verify_file_checksums) +from ubuntutools.misc import (download, + download_text, + verify_file_checksum, + verify_file_checksums, + DownloadError) from ubuntutools.version import Version import logging Logger = logging.getLogger(__name__) -class DownloadError(Exception): - "Unable to pull a source package" - pass - - class Dsc(debian.deb822.Dsc): "Extend deb822's Dsc with checksum verification abilities" diff --git a/ubuntutools/misc.py b/ubuntutools/misc.py index 1b52ebd..3ac61b2 100644 --- a/ubuntutools/misc.py +++ b/ubuntutools/misc.py @@ -52,6 +52,11 @@ UPLOAD_QUEUE_STATUSES = ('New', 'Unapproved', 'Accepted', 'Done', 'Rejected') _system_distribution_chain = [] +class DownloadError(Exception): + "Unable to pull a source package" + pass + + def system_distribution_chain(): """ system_distribution_chain() -> [string]