From 5babcfe869899bf7b7c4dc547c41f07ad349a638 Mon Sep 17 00:00:00 2001 From: Michael Bienia Date: Sat, 20 Mar 2010 19:27:40 +0100 Subject: [PATCH] ubuntutools/lp/udtexceptions.py: Rename PocketDoesNotExistException to PocketDoesNotExistError. --- ubuntutools/lp/lpapicache.py | 2 +- ubuntutools/lp/udtexceptions.py | 4 ++-- ubuntutools/requestsync/lp.py | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ubuntutools/lp/lpapicache.py b/ubuntutools/lp/lpapicache.py index b6aef8f..22f4180 100644 --- a/ubuntutools/lp/lpapicache.py +++ b/ubuntutools/lp/lpapicache.py @@ -260,7 +260,7 @@ class Archive(BaseWrapper): ''' # Check if pocket has a valid value if pocket not in ('Release', 'Security', 'Updates', 'Proposed', 'Backports'): - raise PocketDoesNotExistException("Pocket '%s' does not exist." % pocket) + raise PocketDoesNotExistError("Pocket '%s' does not exist." % pocket) dist = Distribution(self.distribution_link) # Check if series is already a DistoSeries object or not diff --git a/ubuntutools/lp/udtexceptions.py b/ubuntutools/lp/udtexceptions.py index afe0892..fd271b7 100644 --- a/ubuntutools/lp/udtexceptions.py +++ b/ubuntutools/lp/udtexceptions.py @@ -6,8 +6,8 @@ class SeriesNotFoundException(BaseException): """ Thrown when a distroseries is not found """ pass -class PocketDoesNotExistException(BaseException): - """ Thrown when a invalid pocket is passed """ +class PocketDoesNotExistError(Exception): + '''Raised when a invalid pocket is used.''' pass class ArchiveNotFoundException(BaseException): diff --git a/ubuntutools/requestsync/lp.py b/ubuntutools/requestsync/lp.py index 5256836..0d50871 100644 --- a/ubuntutools/requestsync/lp.py +++ b/ubuntutools/requestsync/lp.py @@ -22,7 +22,6 @@ from ubuntutools.requestsync.common import raw_input_exit_on_ctrlc from ubuntutools.lp.lpapicache import Launchpad, Distribution, PersonTeam, DistributionSourcePackage -from ubuntutools.lp.udtexceptions import PackageNotFoundException, SeriesNotFoundException, PocketDoesNotExistException, ArchiveNotFoundException from ubuntutools.lp.libsupport import translate_api_web def getDebianSrcPkg(name, release):