launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #25909
[Merge] ~cjwatson/launchpad:unused-exceptions into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:unused-exceptions into launchpad:master.
Commit message:
Remove several unused exception classes
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/395727
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:unused-exceptions into launchpad:master.
diff --git a/lib/lp/services/database/interfaces.py b/lib/lp/services/database/interfaces.py
index 2a1307e..31f304b 100644
--- a/lib/lp/services/database/interfaces.py
+++ b/lib/lp/services/database/interfaces.py
@@ -86,11 +86,6 @@ class IDatabasePolicy(Interface):
"""Hook called when policy is popped from the `IStoreSelector`."""
-class MasterUnavailable(Exception):
- """A master (writable replica) database was requested but not available.
- """
-
-
class DisallowedStore(Exception):
"""A request was made to access a Store that has been disabled
by the current policy.
@@ -143,7 +138,7 @@ class IStoreSelector(Interface):
for backwards compatibility, and new code should explicitly state
if they want a master or a slave.
- :raises MasterUnavailable:
+ :raises DisconnectionError:
:raises DisallowedStore:
"""
diff --git a/lib/lp/services/messages/interfaces/message.py b/lib/lp/services/messages/interfaces/message.py
index f105300..01ad6ec 100644
--- a/lib/lp/services/messages/interfaces/message.py
+++ b/lib/lp/services/messages/interfaces/message.py
@@ -4,7 +4,6 @@
__metaclass__ = type
__all__ = [
- 'DuplicateMessageId',
'IDirectEmailAuthorization',
'IIndexedMessage',
'IMessage',
@@ -13,7 +12,6 @@ __all__ = [
'IUserToUserEmail',
'IndexedMessage',
'InvalidEmailMessage',
- 'MissingSubject',
'QuotaReachedError',
'UnknownSender',
]
@@ -160,8 +158,6 @@ class IMessageSet(Interface):
Callers may want to explicitly handle the following exceptions:
* UnknownSender
- * MissingSubject
- * DuplicateMessageId
* InvalidEmailMessage
"""
@@ -270,17 +266,6 @@ class UnknownSender(NotFoundError):
"""Raised if we cannot lookup an email message's sender in the database"""
-class MissingSubject(ValueError):
- """Raised if we get an email message with no Subject: header"""
-
-
-class DuplicateMessageId(ValueError):
- """Raised if we attempt to store a new email with an existing Message-Id
-
- Indicates a broken mail client or MTA.
- """
-
-
class InvalidEmailMessage(ValueError):
"""Raised if the email message is too broken for us to deal with.
diff --git a/lib/lp/services/tests/test_looptuner.py b/lib/lp/services/tests/test_looptuner.py
index 2d4c05c..121d514 100644
--- a/lib/lp/services/tests/test_looptuner.py
+++ b/lib/lp/services/tests/test_looptuner.py
@@ -28,10 +28,6 @@ class CleanupException(Exception):
"""Exception raised from the cleanup method of an ITunableLoop."""
-class IsDoneException(Exception):
- """Exception raised from the isDone method of an ITunableLoop."""
-
-
@implementer(ITunableLoop)
class FailingLoop:
diff --git a/lib/lp/snappy/browser/snap.py b/lib/lp/snappy/browser/snap.py
index c4c8c8b..3b06a89 100644
--- a/lib/lp/snappy/browser/snap.py
+++ b/lib/lp/snappy/browser/snap.py
@@ -797,10 +797,6 @@ class SnapEditView(BaseSnapEditView, EnableProcessorsMixin):
data['processors'].append(processor)
-class SnapAuthorizationException(Exception):
- pass
-
-
class SnapAuthorizeView(LaunchpadEditFormView):
"""View for authorizing snap package uploads to the store."""