~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/errors.py

Merge db-devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
"""Errors used in the lp/bugs modules."""
7
7
__all__ = [
8
8
    'InvalidBugTargetType',
9
9
    'InvalidDuplicateValue',
 
10
    'SubscriptionPrivacyViolation',
10
11
]
11
12
 
12
13
import httplib
24
25
@error_status(httplib.EXPECTATION_FAILED)
25
26
class InvalidDuplicateValue(LaunchpadValidationError):
26
27
    """A bug cannot be set as the duplicate of another."""
 
28
 
 
29
 
 
30
@error_status(httplib.BAD_REQUEST)
 
31
class SubscriptionPrivacyViolation(Exception):
 
32
    """The subscription would violate privacy policies."""