Merge lp:~stevenk/launchpad/move-ppaexception into lp:launchpad

Proposed by Steve Kowalik
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 11903
Proposed branch: lp:~stevenk/launchpad/move-ppaexception
Merge into: lp:launchpad
Diff against target: 81 lines (+8/-9)
3 files modified
lib/lp/registry/errors.py (+7/-0)
lib/lp/registry/interfaces/person.py (+0/-7)
lib/lp/registry/model/person.py (+1/-2)
To merge this branch: bzr merge lp:~stevenk/launchpad/move-ppaexception
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+40408@code.launchpad.net

Commit message

[r=gmb][ui=none][no-qa] Shift PPACreationError into lp.registry.errors.

Description of the change

This branch shifts PPACreationError from lp.registry.interfaces.person into lp.registry.errors, and cleans up one piece of lint I noticed.

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/errors.py'
2--- lib/lp/registry/errors.py 2010-10-20 15:51:16 +0000
3+++ lib/lp/registry/errors.py 2010-11-09 07:14:44 +0000
4@@ -13,6 +13,7 @@
5 'NameAlreadyTaken',
6 'NoSuchDistroSeries',
7 'NoSuchSourcePackageName',
8+ 'PPACreationError',
9 'PrivatePersonLinkageError',
10 'TeamMembershipTransitionError',
11 'UserCannotChangeMembershipSilently',
12@@ -120,3 +121,9 @@
13 class JoinNotAllowed(Exception):
14 """User is not allowed to join a given team."""
15 webservice_error(httplib.BAD_REQUEST)
16+
17+
18+class PPACreationError(Exception):
19+ """Raised when there is an issue creating a new PPA."""
20+
21+ webservice_error(httplib.BAD_REQUEST)
22
23=== modified file 'lib/lp/registry/interfaces/person.py'
24--- lib/lp/registry/interfaces/person.py 2010-11-04 17:52:48 +0000
25+++ lib/lp/registry/interfaces/person.py 2010-11-09 07:14:44 +0000
26@@ -27,7 +27,6 @@
27 'ImmutableVisibilityError',
28 'InvalidName',
29 'NoSuchPerson',
30- 'PPACreationError',
31 'PersonCreationRationale',
32 'PersonVisibility',
33 'PersonalStanding',
34@@ -61,7 +60,6 @@
35 operation_returns_entry,
36 rename_parameters_as,
37 REQUEST_USER,
38- webservice_error,
39 )
40 from lazr.restful.fields import (
41 CollectionField,
42@@ -2207,11 +2205,6 @@
43 _message_prefix = "No such person"
44
45
46-class PPACreationError(Exception):
47- """Raised when there is an issue creating a new PPA."""
48-
49- webservice_error(400) # Bad Request
50-
51 # Fix value_type.schema of IPersonViewRestricted attributes.
52 for name in [
53 'all_members_prepopulated',
54
55=== modified file 'lib/lp/registry/model/person.py'
56--- lib/lp/registry/model/person.py 2010-11-04 17:52:48 +0000
57+++ lib/lp/registry/model/person.py 2010-11-09 07:14:44 +0000
58@@ -181,7 +181,6 @@
59 )
60 from lp.bugs.model.bugtarget import HasBugsBase
61 from lp.bugs.model.bugtask import (
62- BugTask,
63 get_related_bugtasks_search_params,
64 )
65 from lp.code.model.hasbranches import (
66@@ -192,6 +191,7 @@
67 from lp.registry.errors import (
68 JoinNotAllowed,
69 NameAlreadyTaken,
70+ PPACreationError,
71 )
72 from lp.registry.interfaces.codeofconduct import ISignedCodeOfConductSet
73 from lp.registry.interfaces.distribution import IDistribution
74@@ -218,7 +218,6 @@
75 IPerson,
76 IPersonSet,
77 ITeam,
78- PPACreationError,
79 PersonalStanding,
80 PersonCreationRationale,
81 PersonVisibility,