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
=== modified file 'lib/lp/registry/errors.py'
--- lib/lp/registry/errors.py 2010-10-20 15:51:16 +0000
+++ lib/lp/registry/errors.py 2010-11-09 07:14:44 +0000
@@ -13,6 +13,7 @@
13 'NameAlreadyTaken',13 'NameAlreadyTaken',
14 'NoSuchDistroSeries',14 'NoSuchDistroSeries',
15 'NoSuchSourcePackageName',15 'NoSuchSourcePackageName',
16 'PPACreationError',
16 'PrivatePersonLinkageError',17 'PrivatePersonLinkageError',
17 'TeamMembershipTransitionError',18 'TeamMembershipTransitionError',
18 'UserCannotChangeMembershipSilently',19 'UserCannotChangeMembershipSilently',
@@ -120,3 +121,9 @@
120class JoinNotAllowed(Exception):121class JoinNotAllowed(Exception):
121 """User is not allowed to join a given team."""122 """User is not allowed to join a given team."""
122 webservice_error(httplib.BAD_REQUEST)123 webservice_error(httplib.BAD_REQUEST)
124
125
126class PPACreationError(Exception):
127 """Raised when there is an issue creating a new PPA."""
128
129 webservice_error(httplib.BAD_REQUEST)
123130
=== modified file 'lib/lp/registry/interfaces/person.py'
--- lib/lp/registry/interfaces/person.py 2010-11-04 17:52:48 +0000
+++ lib/lp/registry/interfaces/person.py 2010-11-09 07:14:44 +0000
@@ -27,7 +27,6 @@
27 'ImmutableVisibilityError',27 'ImmutableVisibilityError',
28 'InvalidName',28 'InvalidName',
29 'NoSuchPerson',29 'NoSuchPerson',
30 'PPACreationError',
31 'PersonCreationRationale',30 'PersonCreationRationale',
32 'PersonVisibility',31 'PersonVisibility',
33 'PersonalStanding',32 'PersonalStanding',
@@ -61,7 +60,6 @@
61 operation_returns_entry,60 operation_returns_entry,
62 rename_parameters_as,61 rename_parameters_as,
63 REQUEST_USER,62 REQUEST_USER,
64 webservice_error,
65 )63 )
66from lazr.restful.fields import (64from lazr.restful.fields import (
67 CollectionField,65 CollectionField,
@@ -2207,11 +2205,6 @@
2207 _message_prefix = "No such person"2205 _message_prefix = "No such person"
22082206
22092207
2210class PPACreationError(Exception):
2211 """Raised when there is an issue creating a new PPA."""
2212
2213 webservice_error(400) # Bad Request
2214
2215# Fix value_type.schema of IPersonViewRestricted attributes.2208# Fix value_type.schema of IPersonViewRestricted attributes.
2216for name in [2209for name in [
2217 'all_members_prepopulated',2210 'all_members_prepopulated',
22182211
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py 2010-11-04 17:52:48 +0000
+++ lib/lp/registry/model/person.py 2010-11-09 07:14:44 +0000
@@ -181,7 +181,6 @@
181 )181 )
182from lp.bugs.model.bugtarget import HasBugsBase182from lp.bugs.model.bugtarget import HasBugsBase
183from lp.bugs.model.bugtask import (183from lp.bugs.model.bugtask import (
184 BugTask,
185 get_related_bugtasks_search_params,184 get_related_bugtasks_search_params,
186 )185 )
187from lp.code.model.hasbranches import (186from lp.code.model.hasbranches import (
@@ -192,6 +191,7 @@
192from lp.registry.errors import (191from lp.registry.errors import (
193 JoinNotAllowed,192 JoinNotAllowed,
194 NameAlreadyTaken,193 NameAlreadyTaken,
194 PPACreationError,
195 )195 )
196from lp.registry.interfaces.codeofconduct import ISignedCodeOfConductSet196from lp.registry.interfaces.codeofconduct import ISignedCodeOfConductSet
197from lp.registry.interfaces.distribution import IDistribution197from lp.registry.interfaces.distribution import IDistribution
@@ -218,7 +218,6 @@
218 IPerson,218 IPerson,
219 IPersonSet,219 IPersonSet,
220 ITeam,220 ITeam,
221 PPACreationError,
222 PersonalStanding,221 PersonalStanding,
223 PersonCreationRationale,222 PersonCreationRationale,
224 PersonVisibility,223 PersonVisibility,