launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00369
[Merge] lp:~thumper/launchpad/move-webapp-errors into lp:launchpad/devel
Tim Penhey has proposed merging lp:~thumper/launchpad/move-webapp-errors into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Very boring branch, done as a pre-pre-branch branch to move errors from canonical.launchpad.webapp.interfaces into lp.app.errors.
--
https://code.launchpad.net/~thumper/launchpad/move-webapp-errors/+merge/31505
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~thumper/launchpad/move-webapp-errors into lp:launchpad/devel.
=== modified file 'cronscripts/foaf-update-karma-cache.py'
--- cronscripts/foaf-update-karma-cache.py 2010-04-27 19:48:39 +0000
+++ cronscripts/foaf-update-karma-cache.py 2010-08-02 02:29:41 +0000
@@ -12,7 +12,8 @@
from canonical.config import config
from canonical.database.sqlbase import (
ISOLATION_LEVEL_AUTOCOMMIT, flush_database_updates)
-from canonical.launchpad.interfaces import IKarmaCacheManager, NotFoundError
+from canonical.launchpad.interfaces import IKarmaCacheManager
+from lp.app.errors import NotFoundError
from lp.services.scripts.base import LaunchpadCronScript
=== modified file 'lib/canonical/launchpad/browser/feeds.py'
--- lib/canonical/launchpad/browser/feeds.py 2010-02-27 10:19:18 +0000
+++ lib/canonical/launchpad/browser/feeds.py 2010-08-02 02:29:41 +0000
@@ -31,7 +31,7 @@
from canonical.config import config
from canonical.launchpad.interfaces import (
IAnnouncementSet, IBugSet, IBugTaskSet, IFeedsApplication,
- IPillarNameSet, NotFoundError)
+ IPillarNameSet)
from canonical.launchpad.interfaces import (
IBugTask, IHasAnnouncements, IHasBugs, ILaunchpadRoot)
from canonical.launchpad.layers import FeedsLayer
@@ -41,6 +41,7 @@
from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
from canonical.launchpad.webapp.vhosts import allvhosts
from canonical.launchpad.webapp.url import urlappend
+from lp.app.errors import NotFoundError
from lp.code.interfaces.branch import IBranch
from lp.registry.interfaces.person import IPerson, IPersonSet
from lp.registry.interfaces.product import IProduct
=== modified file 'lib/canonical/launchpad/browser/launchpad.py'
--- lib/canonical/launchpad/browser/launchpad.py 2010-07-19 07:31:30 +0000
+++ lib/canonical/launchpad/browser/launchpad.py 2010-08-02 02:29:41 +0000
@@ -62,8 +62,7 @@
stepto)
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
from canonical.launchpad.webapp.interfaces import (
- GoneError, IBreadcrumb, ILaunchBag, ILaunchpadRoot,
- INavigationMenu, NotFoundError, POSTToNonCanonicalURL)
+ IBreadcrumb, ILaunchBag, ILaunchpadRoot, INavigationMenu)
from canonical.launchpad.webapp.publisher import RedirectionView
from canonical.launchpad.webapp.authorization import check_permission
from canonical.launchpad.webapp.tales import PageTemplateContextsAPI
@@ -73,6 +72,7 @@
from lazr.uri import URI
+from lp.app.errors import GoneError, NotFoundError, POSTToNonCanonicalURL
from lp.app.interfaces.headings import IMajorHeadingView
from lp.registry.interfaces.announcement import IAnnouncementSet
from lp.soyuz.interfaces.binarypackagename import (
=== modified file 'lib/canonical/launchpad/browser/oauth.py'
--- lib/canonical/launchpad/browser/oauth.py 2010-07-13 15:59:04 +0000
+++ lib/canonical/launchpad/browser/oauth.py 2010-08-02 02:29:41 +0000
@@ -14,6 +14,7 @@
from zope.component import getUtility
from zope.formlib.form import Action, Actions
+from lp.app.errors import UnexpectedFormData
from lp.registry.interfaces.distribution import IDistributionSet
from canonical.launchpad.interfaces.oauth import (
IOAuthConsumerSet, IOAuthRequestToken, IOAuthRequestTokenSet,
@@ -22,8 +23,7 @@
from canonical.launchpad.webapp import LaunchpadFormView, LaunchpadView
from canonical.launchpad.webapp.authentication import (
check_oauth_signature, get_oauth_authorization)
-from canonical.launchpad.webapp.interfaces import (
- OAuthPermission, UnexpectedFormData)
+from canonical.launchpad.webapp.interfaces import OAuthPermission
from lazr.restful import HTTPResource
=== modified file 'lib/canonical/launchpad/browser/tests/test_launchpad.py'
--- lib/canonical/launchpad/browser/tests/test_launchpad.py 2010-03-11 20:54:36 +0000
+++ lib/canonical/launchpad/browser/tests/test_launchpad.py 2010-08-02 02:29:41 +0000
@@ -14,11 +14,11 @@
from canonical.launchpad.browser.launchpad import LaunchpadRootNavigation
from canonical.launchpad.interfaces.account import AccountStatus
from canonical.launchpad.webapp import canonical_url
-from canonical.launchpad.webapp.interfaces import GoneError
from canonical.launchpad.webapp.servers import LaunchpadTestRequest
from canonical.launchpad.webapp.url import urlappend
from canonical.testing.layers import DatabaseFunctionalLayer
+from lp.app.errors import GoneError
from lp.registry.interfaces.person import IPersonSet, PersonVisibility
from lp.testing import login_person, TestCaseWithFactory
from lp.testing.views import create_view
=== modified file 'lib/canonical/launchpad/browser/vocabulary.py'
--- lib/canonical/launchpad/browser/vocabulary.py 2010-02-03 05:18:21 +0000
+++ lib/canonical/launchpad/browser/vocabulary.py 2010-08-02 02:29:41 +0000
@@ -27,14 +27,14 @@
from lazr.restful.interfaces import IWebServiceClientRequest
+from lp.app.errors import UnexpectedFormData
from lp.code.interfaces.branch import IBranch
from lp.registry.interfaces.person import IPerson
from lp.registry.interfaces.sourcepackagename import ISourcePackageName
from lp.registry.model.sourcepackagename import getSourcePackageDescriptions
from canonical.launchpad.webapp.batching import BatchNavigator
-from canonical.launchpad.webapp.interfaces import (
- NoCanonicalUrl, UnexpectedFormData)
+from canonical.launchpad.webapp.interfaces import NoCanonicalUrl
from canonical.launchpad.webapp.publisher import canonical_url
from canonical.launchpad.webapp.tales import ObjectImageDisplayAPI
from canonical.launchpad.webapp.vocabulary import IHugeVocabulary
=== modified file 'lib/canonical/launchpad/database/logintoken.py'
--- lib/canonical/launchpad/database/logintoken.py 2010-03-30 20:02:53 +0000
+++ lib/canonical/launchpad/database/logintoken.py 2010-08-02 02:29:41 +0000
@@ -28,7 +28,7 @@
create_unique_token_for_table)
from canonical.launchpad.helpers import get_email_template
from canonical.launchpad.interfaces import (
- ILoginToken, ILoginTokenSet, IGPGHandler, NotFoundError, IPersonSet,
+ ILoginToken, ILoginTokenSet, IGPGHandler, IPersonSet,
LoginTokenType)
from canonical.launchpad.interfaces.emailaddress import IEmailAddressSet
from canonical.launchpad.interfaces.lpstorm import IMasterObject
@@ -37,6 +37,7 @@
from canonical.launchpad.webapp import canonical_url
from canonical.launchpad.webapp.interfaces import (
IStoreSelector, MAIN_STORE, MASTER_FLAVOR)
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.gpg import IGPGKeySet
=== modified file 'lib/canonical/launchpad/database/message.py'
--- lib/canonical/launchpad/database/message.py 2010-07-14 14:11:15 +0000
+++ lib/canonical/launchpad/database/message.py 2010-08-02 02:29:41 +0000
@@ -40,12 +40,13 @@
from canonical.launchpad.helpers import get_filename_from_message_id
from lp.services.job.model.job import Job
from canonical.launchpad.interfaces import (
- ILibraryFileAliasSet, IPersonSet, NotFoundError, PersonCreationRationale,
+ ILibraryFileAliasSet, IPersonSet, PersonCreationRationale,
UnknownSender)
from canonical.launchpad.interfaces.message import (
IDirectEmailAuthorization, IMessage, IMessageChunk, IMessageJob,
IMessageSet, IUserToUserEmail, InvalidEmailMessage)
from canonical.launchpad.mail import signed_message_from_string
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.person import validate_public_person
from lazr.config import as_timedelta
=== modified file 'lib/canonical/launchpad/database/stormsugar.py'
--- lib/canonical/launchpad/database/stormsugar.py 2009-06-25 05:30:52 +0000
+++ lib/canonical/launchpad/database/stormsugar.py 2010-08-02 02:29:41 +0000
@@ -25,7 +25,8 @@
from zope.component import getUtility
from canonical.launchpad.webapp.interfaces import (
- DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE, MASTER_FLAVOR, NotFoundError)
+ DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE, MASTER_FLAVOR)
+from lp.app.errors import NotFoundError
class ObjectNotFound(NotFoundError):
=== modified file 'lib/canonical/launchpad/doc/navigation.txt'
--- lib/canonical/launchpad/doc/navigation.txt 2009-09-17 20:59:14 +0000
+++ lib/canonical/launchpad/doc/navigation.txt 2010-08-02 02:29:41 +0000
@@ -291,7 +291,7 @@
Let's create a subclass of ThingSetNavigation, and add a 'stepto'.
>>> from canonical.launchpad.webapp import stepto
- >>> from canonical.launchpad.interfaces import NotFoundError
+ >>> from lp.app.errors import NotFoundError
>>> class ThingSetNavigation2(ThingSetNavigation):
...
=== modified file 'lib/canonical/launchpad/interfaces/launchpad.py'
--- lib/canonical/launchpad/interfaces/launchpad.py 2010-07-15 07:39:09 +0000
+++ lib/canonical/launchpad/interfaces/launchpad.py 2010-08-02 02:29:41 +0000
@@ -23,7 +23,7 @@
# entire codebase and fix where the import should come from.
from canonical.launchpad.webapp.interfaces import (
IBasicLaunchpadRequest, ILaunchBag, ILaunchpadRoot, IOpenLaunchBag,
- NotFoundError, UnexpectedFormData, UnsafeFormGetSubmissionError)
+ UnsafeFormGetSubmissionError)
__all__ = [
@@ -65,8 +65,6 @@
'IWriteZODBAnnotation',
'IZODBAnnotation',
'NameNotAvailable',
- 'NotFoundError',
- 'UnexpectedFormData',
'UnknownRecipientError',
'UnsafeFormGetSubmissionError',
]
=== modified file 'lib/canonical/launchpad/interfaces/message.py'
--- lib/canonical/launchpad/interfaces/message.py 2009-12-25 16:36:53 +0000
+++ lib/canonical/launchpad/interfaces/message.py 2010-08-02 02:29:41 +0000
@@ -26,7 +26,7 @@
from zope.schema import Bool, Datetime, Int, Object, Text, TextLine
from canonical.launchpad import _
-from canonical.launchpad.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.services.job.interfaces.job import IJob
from canonical.launchpad.interfaces.librarian import ILibraryFileAlias
=== modified file 'lib/canonical/launchpad/interfaces/validation.py'
--- lib/canonical/launchpad/interfaces/validation.py 2009-10-26 18:40:04 +0000
+++ lib/canonical/launchpad/interfaces/validation.py 2010-08-02 02:29:41 +0000
@@ -30,7 +30,7 @@
from zope.app.form.interfaces import WidgetsError
from canonical.launchpad import _
-from canonical.launchpad.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from canonical.launchpad.interfaces.launchpad import ILaunchBag
from canonical.launchpad.validators import LaunchpadValidationError
from canonical.launchpad.validators.email import valid_email
=== modified file 'lib/canonical/launchpad/mail/commands.py'
--- lib/canonical/launchpad/mail/commands.py 2010-07-22 12:17:41 +0000
+++ lib/canonical/launchpad/mail/commands.py 2010-08-02 02:29:41 +0000
@@ -21,7 +21,7 @@
IBugTaskEditEmailCommand, IBugSet, ICveSet, ILaunchBag,
IMessageSet, IDistroBugTask,
IDistributionSourcePackage, EmailProcessingError,
- NotFoundError, CreateBugParams, IPillarNameSet,
+ CreateBugParams, IPillarNameSet,
BugTargetNotFound, IProjectGroup, ISourcePackage, IProductSeries,
BugTaskStatus)
from lazr.lifecycle.event import (
@@ -34,7 +34,7 @@
from canonical.launchpad.validators.name import valid_name
from canonical.launchpad.webapp.authorization import check_permission
-from lp.app.errors import UserCannotUnsubscribePerson
+from lp.app.errors import NotFoundError, UserCannotUnsubscribePerson
def normalize_arguments(string_args):
=== modified file 'lib/canonical/launchpad/utilities/celebrities.py'
--- lib/canonical/launchpad/utilities/celebrities.py 2010-06-30 13:21:37 +0000
+++ lib/canonical/launchpad/utilities/celebrities.py 2010-08-02 02:29:41 +0000
@@ -10,7 +10,9 @@
from zope.component import getUtility
from canonical.launchpad.interfaces import (
ILanguageSet, ILaunchpadCelebrities, IPersonSet, IDistributionSet,
- IBugTrackerSet, IProductSet, NotFoundError, IDistributionMirrorSet)
+ IBugTrackerSet, IProductSet, IDistributionMirrorSet)
+from lp.app.errors import NotFoundError
+
class MutatedCelebrityError(Exception):
"""A celebrity has had its id or name changed in the database.
=== modified file 'lib/canonical/launchpad/webapp/interfaces.py'
--- lib/canonical/launchpad/webapp/interfaces.py 2010-07-30 00:06:00 +0000
+++ lib/canonical/launchpad/webapp/interfaces.py 2010-08-02 02:29:41 +0000
@@ -20,51 +20,6 @@
from canonical.launchpad import _
-class TranslationUnavailable(Exception):
- """Translation objects are unavailable."""
-
-
-class NotFoundError(KeyError):
- """Launchpad object not found."""
-
-
-class GoneError(KeyError):
- """Launchpad object is gone."""
-
-
-class NameLookupFailed(NotFoundError):
- """Raised when a lookup by name fails.
-
- Subclasses should define the `_message_prefix` class variable, which will
- be prefixed to the quoted name of the name that could not be found.
-
- :ivar name: The name that could not be found.
- """
-
- _message_prefix = "Not found"
-
- def __init__(self, name, message=None):
- if message is None:
- message = self._message_prefix
- self.message = "%s: '%s'." % (message, name)
- self.name = name
- NotFoundError.__init__(self, self.message)
-
- def __str__(self):
- return self.message
-
-
-class UnexpectedFormData(AssertionError):
- """Got form data that is not what is expected by a form handler."""
-
-
-class POSTToNonCanonicalURL(UnexpectedFormData):
- """Got a POST to an incorrect URL.
-
- One example would be a URL containing uppercase letters.
- """
-
-
class IAPIDocRoot(IContainmentRoot):
"""Marker interface for the root object of the apidoc vhost."""
=== modified file 'lib/canonical/launchpad/webapp/publisher.py'
--- lib/canonical/launchpad/webapp/publisher.py 2010-07-14 12:31:25 +0000
+++ lib/canonical/launchpad/webapp/publisher.py 2010-08-02 02:29:41 +0000
@@ -42,10 +42,10 @@
from canonical.launchpad.webapp.vhosts import allvhosts
from canonical.launchpad.webapp.interfaces import (
ICanonicalUrlData, ILaunchBag, ILaunchpadApplication, ILaunchpadContainer,
- ILaunchpadRoot, IOpenLaunchBag, IStructuredString, NoCanonicalUrl,
- NotFoundError)
+ ILaunchpadRoot, IOpenLaunchBag, IStructuredString, NoCanonicalUrl)
from canonical.launchpad.webapp.url import urlappend
from canonical.lazr.utils import get_current_browser_request
+from lp.app.errors import NotFoundError
# HTTP Status code constants - define as appropriate.
=== modified file 'lib/canonical/launchpad/webapp/servers.py'
--- lib/canonical/launchpad/webapp/servers.py 2010-07-28 18:07:43 +0000
+++ lib/canonical/launchpad/webapp/servers.py 2010-08-02 02:29:41 +0000
@@ -46,6 +46,7 @@
from lazr.restful.publisher import (
WebServicePublicationMixin, WebServiceRequestTraversal)
+from lp.app.errors import UnexpectedFormData
from lp.testopenid.interfaces.server import ITestOpenIDApplication
from canonical.launchpad.interfaces.launchpad import (
IFeedsApplication, IPrivateApplication, IWebServiceApplication)
@@ -64,7 +65,7 @@
IAPIDocRoot, IBasicLaunchpadRequest, IBrowserFormNG,
ILaunchpadBrowserApplicationRequest, ILaunchpadProtocolError,
INotificationRequest, INotificationResponse, IPlacelessAuthUtility,
- IPlacelessLoginSource, OAuthPermission, UnexpectedFormData)
+ IPlacelessLoginSource, OAuthPermission)
from canonical.launchpad.webapp.authentication import (
check_oauth_signature, get_oauth_authorization)
from canonical.launchpad.webapp.errorlog import ErrorReportRequest
=== modified file 'lib/canonical/launchpad/webapp/tests/test_errorlog.py'
--- lib/canonical/launchpad/webapp/tests/test_errorlog.py 2010-07-05 19:25:14 +0000
+++ lib/canonical/launchpad/webapp/tests/test_errorlog.py 2010-08-02 02:29:41 +0000
@@ -35,9 +35,9 @@
from canonical.launchpad.webapp.errorlog import (
ErrorReport, ErrorReportingUtility, OopsLoggingHandler, ScriptRequest,
_is_sensitive)
-from canonical.launchpad.webapp.interfaces import (
- NoReferrerError, TranslationUnavailable)
+from canonical.launchpad.webapp.interfaces import NoReferrerError
from lazr.restful.declarations import webservice_error
+from lp.app.errors import TranslationUnavailable
from lp.services.log.uniquefileallocator import UniqueFileAllocator
from lp.services.osutils import remove_tree
from lp.testing import TestCase
=== modified file 'lib/canonical/launchpad/zcml/launchpad.zcml'
--- lib/canonical/launchpad/zcml/launchpad.zcml 2010-07-13 13:54:32 +0000
+++ lib/canonical/launchpad/zcml/launchpad.zcml 2010-08-02 02:29:41 +0000
@@ -39,7 +39,7 @@
<!-- Gone -->
<browser:page
- for="canonical.launchpad.webapp.interfaces.GoneError"
+ for="lp.app.errors.GoneError"
name="index.html"
permission="zope.Public"
template="../templates/launchpad-gone.pt"
@@ -66,7 +66,7 @@
<!-- UnexpectedFormData -->
<browser:page
- for="canonical.launchpad.interfaces.UnexpectedFormData"
+ for="lp.app.errors.UnexpectedFormData"
name="index.html"
permission="zope.Public"
template="../templates/launchpad-unexpectedformdata.pt"
@@ -111,7 +111,7 @@
<!-- TranslationUnavailable -->
<browser:page
- for="canonical.launchpad.webapp.interfaces.TranslationUnavailable"
+ for="lp.app.errors.TranslationUnavailable"
name="index.html"
permission="zope.Public"
template="../templates/launchpad-translationunavailable.pt"
=== modified file 'lib/canonical/widgets/bug.py'
--- lib/canonical/widgets/bug.py 2009-06-25 05:30:52 +0000
+++ lib/canonical/widgets/bug.py 2010-08-02 02:29:41 +0000
@@ -11,7 +11,8 @@
from zope.component import getUtility
from zope.schema.interfaces import ConstraintNotSatisfied
-from canonical.launchpad.interfaces import IBugSet, NotFoundError
+from lp.app.errors import NotFoundError
+from lp.bugs.interfaces.bug import IBugSet
from canonical.launchpad.validators import LaunchpadValidationError
=== modified file 'lib/canonical/widgets/bugtask.py'
--- lib/canonical/widgets/bugtask.py 2010-05-25 14:50:42 +0000
+++ lib/canonical/widgets/bugtask.py 2010-08-02 02:29:41 +0000
@@ -24,14 +24,15 @@
from canonical.launchpad.fields import URIField
from canonical.launchpad.interfaces import (
IBugWatchSet, IDistributionSet, ILaunchBag, NoBugTrackerFound,
- NotFoundError, UnrecognizedBugTrackerURL)
+ UnrecognizedBugTrackerURL)
from canonical.launchpad.webapp import canonical_url
-from canonical.launchpad.webapp.interfaces import UnexpectedFormData
from canonical.launchpad.webapp.tales import TeamFormatterAPI
from canonical.widgets.helpers import get_widget_template
from canonical.widgets.itemswidgets import LaunchpadRadioWidget
from canonical.widgets.popup import VocabularyPickerWidget
from canonical.widgets.textwidgets import StrippedTextWidget, URIWidget
+from lp.app.errors import NotFoundError, UnexpectedFormData
+
class BugTaskAssigneeWidget(Widget):
"""A widget for setting the assignee on an IBugTask."""
=== modified file 'lib/canonical/widgets/launchpadtarget.py'
--- lib/canonical/widgets/launchpadtarget.py 2009-06-25 05:30:52 +0000
+++ lib/canonical/widgets/launchpadtarget.py 2010-08-02 02:29:41 +0000
@@ -16,11 +16,12 @@
from canonical.launchpad.interfaces import (
IDistribution, IDistributionSourcePackage, ILaunchpadCelebrities,
- IProduct, NotFoundError, UnexpectedFormData)
+ IProduct)
from canonical.launchpad.validators import LaunchpadValidationError
from canonical.launchpad.webapp.interfaces import (
IMultiLineWidgetLayout, IAlwaysSubmittedWidget)
from canonical.widgets.itemswidgets import LaunchpadDropdownWidget
+from lp.app.errors import NotFoundError, UnexpectedFormData
class LaunchpadTargetWidget(BrowserWidget, InputWidget):
=== modified file 'lib/canonical/widgets/project.py'
--- lib/canonical/widgets/project.py 2010-02-17 11:13:06 +0000
+++ lib/canonical/widgets/project.py 2010-08-02 02:29:41 +0000
@@ -15,7 +15,7 @@
from zope.interface import implements
from zope.schema import Choice
-from canonical.launchpad.interfaces import UnexpectedFormData
+from lp.app.errors import UnexpectedFormData
from canonical.launchpad.validators import LaunchpadValidationError
from canonical.launchpad.webapp.interfaces import IAlwaysSubmittedWidget
=== modified file 'lib/canonical/widgets/textwidgets.py'
--- lib/canonical/widgets/textwidgets.py 2009-06-25 05:30:52 +0000
+++ lib/canonical/widgets/textwidgets.py 2010-08-02 02:29:41 +0000
@@ -9,7 +9,7 @@
from zope.app.form.browser.textwidgets import TextAreaWidget, TextWidget
from zope.app.form.interfaces import ConversionError
-from canonical.launchpad.interfaces import UnexpectedFormData
+from lp.app.errors import UnexpectedFormData
# XXX matsubara 2006-05-10: Should I move our NewLineToSpacesWidget to
# this module?
=== modified file 'lib/lp/answers/browser/faqtarget.py'
--- lib/lp/answers/browser/faqtarget.py 2010-07-28 16:56:05 +0000
+++ lib/lp/answers/browser/faqtarget.py 2010-08-02 02:29:41 +0000
@@ -13,9 +13,9 @@
from canonical.launchpad import _
from canonical.launchpad.webapp import (
action, canonical_url, custom_widget, LaunchpadFormView, stepthrough)
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.widgets import TokensTextWidget
from lp.answers.interfaces.faq import IFAQ
+from lp.app.errors import NotFoundError
class FAQTargetNavigationMixin:
=== modified file 'lib/lp/answers/browser/question.py'
--- lib/lp/answers/browser/question.py 2010-07-27 17:18:24 +0000
+++ lib/lp/answers/browser/question.py 2010-08-02 02:29:41 +0000
@@ -54,8 +54,7 @@
from canonical.launchpad.helpers import (
is_english_variant, preferred_or_request_languages)
-from canonical.launchpad.webapp.interfaces import (
- NotFoundError, UnexpectedFormData)
+from lp.app.errors import NotFoundError, UnexpectedFormData
from canonical.launchpad.webapp import (
ApplicationMenu, ContextMenu, Link, canonical_url,
enabled_with_permission, Navigation, LaunchpadView, action,
=== modified file 'lib/lp/answers/browser/questiontarget.py'
--- lib/lp/answers/browser/questiontarget.py 2010-07-28 16:56:05 +0000
+++ lib/lp/answers/browser/questiontarget.py 2010-08-02 02:29:41 +0000
@@ -39,7 +39,6 @@
from canonical.launchpad.helpers import (
browserLanguages, is_english_variant, preferred_or_request_languages)
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.webapp import (
action, canonical_url, custom_widget, LaunchpadFormView, Link,
safe_action, stepto, stepthrough, urlappend)
@@ -47,6 +46,7 @@
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
from canonical.launchpad.webapp.menu import structured
from canonical.widgets import LabeledMultiCheckBoxWidget
+from lp.app.errors import NotFoundError
from lp.services.worlddata.interfaces.language import ILanguageSet
from lp.registry.interfaces.projectgroup import IProjectGroup
from lp.registry.interfaces.distribution import IDistribution
=== modified file 'lib/lp/app/browser/root.py'
--- lib/lp/app/browser/root.py 2010-07-19 19:49:22 +0000
+++ lib/lp/app/browser/root.py 2010-08-02 02:29:41 +0000
@@ -35,12 +35,12 @@
action, LaunchpadFormView, LaunchpadView, safe_action)
from canonical.launchpad.webapp.authorization import check_permission
from canonical.launchpad.webapp.batching import BatchNavigator
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.webapp.vhosts import allvhosts
from lazr.batchnavigator.z3batching import batch
from lp.answers.interfaces.questioncollection import IQuestionSet
+from lp.app.errors import NotFoundError
from lp.blueprints.interfaces.specification import ISpecificationSet
from lp.code.interfaces.branchcollection import IAllBranches
from lp.bugs.interfaces.bug import IBugSet
=== modified file 'lib/lp/app/errors.py'
--- lib/lp/app/errors.py 2010-05-25 03:11:16 +0000
+++ lib/lp/app/errors.py 2010-08-02 02:29:41 +0000
@@ -5,6 +5,12 @@
__metaclass__ = type
__all__ = [
+ 'GoneError',
+ 'NameLookupFailed',
+ 'NotFoundError',
+ 'POSTToNonCanonicalURL',
+ 'TranslationUnavailable',
+ 'UnexpectedFormData',
'UserCannotUnsubscribePerson',
]
@@ -13,6 +19,50 @@
from lazr.restful.declarations import webservice_error
+class TranslationUnavailable(Exception):
+ """Translation objects are unavailable."""
+
+
+class NotFoundError(KeyError):
+ """Launchpad object not found."""
+
+
+class GoneError(KeyError):
+ """Launchpad object is gone."""
+
+
+class NameLookupFailed(NotFoundError):
+ """Raised when a lookup by name fails.
+
+ Subclasses should define the `_message_prefix` class variable, which will
+ be prefixed to the quoted name of the name that could not be found.
+
+ :ivar name: The name that could not be found.
+ """
+
+ _message_prefix = "Not found"
+
+ def __init__(self, name, message=None):
+ if message is None:
+ message = self._message_prefix
+ self.message = "%s: '%s'." % (message, name)
+ self.name = name
+ NotFoundError.__init__(self, self.message)
+
+ def __str__(self):
+ return self.message
+
+
+class UnexpectedFormData(AssertionError):
+ """Got form data that is not what is expected by a form handler."""
+
+
+class POSTToNonCanonicalURL(UnexpectedFormData):
+ """Got a POST to an incorrect URL.
+
+ One example would be a URL containing uppercase letters.
+ """
+
class UserCannotUnsubscribePerson(Unauthorized):
"""User does not have persmisson to unsubscribe person or team."""
webservice_error(401)
=== modified file 'lib/lp/archiveuploader/dscfile.py'
--- lib/lp/archiveuploader/dscfile.py 2010-07-15 11:30:58 +0000
+++ lib/lp/archiveuploader/dscfile.py 2010-08-02 02:29:41 +0000
@@ -30,8 +30,9 @@
from canonical.encoding import guess as guess_encoding
from canonical.launchpad.interfaces import (
GPGVerificationError, IGPGHandler, IGPGKeySet,
- ISourcePackageNameSet, NotFoundError)
+ ISourcePackageNameSet)
from canonical.librarian.utils import copy_and_close
+from lp.app.errors import NotFoundError
from lp.archiveuploader.nascentuploadfile import (
UploadWarning, UploadError, NascentUploadFile, SourceUploadFile)
from lp.archiveuploader.tagfiles import (
=== modified file 'lib/lp/archiveuploader/nascentupload.py'
--- lib/lp/archiveuploader/nascentupload.py 2010-07-23 06:22:13 +0000
+++ lib/lp/archiveuploader/nascentupload.py 2010-08-02 02:29:41 +0000
@@ -23,6 +23,7 @@
from zope.component import getUtility
+from lp.app.errors import NotFoundError
from lp.archiveuploader.changesfile import ChangesFile
from lp.archiveuploader.dscfile import DSCFile
from lp.archiveuploader.nascentuploadfile import (
@@ -34,7 +35,7 @@
from lp.soyuz.interfaces.archive import ArchivePurpose, MAIN_ARCHIVE_PURPOSES
from canonical.launchpad.interfaces import (
IBinaryPackageNameSet, IDistributionSet, ILibraryFileAliasSet,
- ISourcePackageNameSet, NotFoundError, QueueInconsistentStateError)
+ ISourcePackageNameSet, QueueInconsistentStateError)
PARTNER_COMPONENT_NAME = 'partner'
=== modified file 'lib/lp/archiveuploader/tests/test_ppauploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_ppauploadprocessor.py 2010-07-18 00:26:33 +0000
+++ lib/lp/archiveuploader/tests/test_ppauploadprocessor.py 2010-08-02 02:29:41 +0000
@@ -17,6 +17,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.errors import NotFoundError
from lp.archiveuploader.uploadprocessor import UploadProcessor
from lp.archiveuploader.tests.test_uploadprocessor import (
TestUploadProcessorBase)
@@ -34,7 +35,7 @@
from lp.soyuz.interfaces.sourcepackageformat import (
ISourcePackageFormatSelectionSet, SourcePackageFormat)
from canonical.launchpad.interfaces import (
- ILaunchpadCelebrities, ILibraryFileAliasSet, NotFoundError)
+ ILaunchpadCelebrities, ILibraryFileAliasSet)
from canonical.launchpad.testing.fakepackager import FakePackager
from lp.soyuz.tests.test_publishing import SoyuzTestPublisher
from lp.services.mail import stub
=== modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_uploadprocessor.py 2010-07-21 14:14:54 +0000
+++ lib/lp/archiveuploader/tests/test_uploadprocessor.py 2010-08-02 02:29:41 +0000
@@ -22,11 +22,11 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.errors import NotFoundError
from lp.archiveuploader.uploadpolicy import AbstractUploadPolicy
from lp.archiveuploader.uploadprocessor import UploadProcessor
from canonical.config import config
from canonical.database.constants import UTC_NOW
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.soyuz.model.archivepermission import ArchivePermission
from lp.soyuz.model.binarypackagename import BinaryPackageName
from lp.soyuz.model.binarypackagerelease import (
=== modified file 'lib/lp/bugs/browser/bug.py'
--- lib/lp/bugs/browser/bug.py 2010-07-22 12:17:41 +0000
+++ lib/lp/bugs/browser/bug.py 2010-08-02 02:29:41 +0000
@@ -49,7 +49,8 @@
from canonical.cachedproperty import cachedproperty
from canonical.launchpad import _
-from canonical.launchpad.webapp.interfaces import ILaunchBag, NotFoundError
+from lp.app.errors import NotFoundError
+from canonical.launchpad.webapp.interfaces import ILaunchBag
from lp.bugs.interfaces.bug import IBug, IBugSet
from lp.bugs.interfaces.bugattachment import BugAttachmentType
from lp.bugs.interfaces.bugtask import (
=== modified file 'lib/lp/bugs/browser/bugtarget.py'
--- lib/lp/bugs/browser/bugtarget.py 2010-07-15 11:01:06 +0000
+++ lib/lp/bugs/browser/bugtarget.py 2010-08-02 02:29:41 +0000
@@ -70,8 +70,8 @@
from canonical.launchpad.searchbuilder import any
from canonical.launchpad.webapp import urlappend
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.interfaces import (
- ILaunchBag, NotFoundError, UnexpectedFormData)
+from canonical.launchpad.webapp.interfaces import ILaunchBag
+from lp.app.errors import NotFoundError, UnexpectedFormData
from lp.bugs.interfaces.bug import (
CreateBugParams, IBugAddForm, IProjectGroupBugAddForm)
from lp.bugs.interfaces.malone import IMaloneApplication
=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py 2010-07-15 07:39:09 +0000
+++ lib/lp/bugs/browser/bugtask.py 2010-08-02 02:29:41 +0000
@@ -131,8 +131,8 @@
from canonical.launchpad.interfaces.validation import (
valid_upstreamtask, validate_distrotask)
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.interfaces import (
- ILaunchBag, NotFoundError, UnexpectedFormData)
+from canonical.launchpad.webapp.interfaces import ILaunchBag
+from lp.app.errors import NotFoundError, UnexpectedFormData
from canonical.launchpad.searchbuilder import all, any, NULL
=== modified file 'lib/lp/bugs/doc/bugtask-retrieval.txt'
--- lib/lp/bugs/doc/bugtask-retrieval.txt 2009-06-12 16:36:02 +0000
+++ lib/lp/bugs/doc/bugtask-retrieval.txt 2010-08-02 02:29:41 +0000
@@ -6,7 +6,8 @@
Launchpad. We'll use this implementation for demonstration purposes:
>>> from canonical.launchpad.interfaces import (
- ... IBugTask, IBugTaskSet, NotFoundError)
+ ... IBugTask, IBugTaskSet)
+ >>> from lp.app.errors import NotFoundError
>>> task_set = getUtility(IBugTaskSet)
=== modified file 'lib/lp/bugs/interfaces/bug.py'
--- lib/lp/bugs/interfaces/bug.py 2010-07-22 12:17:41 +0000
+++ lib/lp/bugs/interfaces/bug.py 2010-08-02 02:29:41 +0000
@@ -38,7 +38,8 @@
from lp.bugs.interfaces.bugwatch import IBugWatch
from lp.bugs.interfaces.bugbranch import IBugBranch
from lp.bugs.interfaces.cve import ICve
-from canonical.launchpad.interfaces.launchpad import IPrivacy, NotFoundError
+from canonical.launchpad.interfaces.launchpad import IPrivacy
+from lp.app.errors import NotFoundError
from canonical.launchpad.interfaces.message import IMessage
from lp.code.interfaces.branchlink import IHasLinkedBranches
from lp.registry.interfaces.mentoringoffer import ICanBeMentored
=== modified file 'lib/lp/bugs/model/bug.py'
--- lib/lp/bugs/model/bug.py 2010-07-22 20:30:26 +0000
+++ lib/lp/bugs/model/bug.py 2010-08-02 02:29:41 +0000
@@ -62,10 +62,10 @@
from lp.bugs.mail.bugnotificationrecipients import BugNotificationRecipients
from canonical.launchpad.validators import LaunchpadValidationError
from canonical.launchpad.webapp.interfaces import (
- IStoreSelector, DEFAULT_FLAVOR, MAIN_STORE, NotFoundError)
+ IStoreSelector, DEFAULT_FLAVOR, MAIN_STORE)
from lp.answers.interfaces.questiontarget import IQuestionTarget
-from lp.app.errors import UserCannotUnsubscribePerson
+from lp.app.errors import NotFoundError, UserCannotUnsubscribePerson
from lp.bugs.adapters.bugchange import (
BranchLinkedToBug, BranchUnlinkedFromBug, BugConvertedToQuestion,
BugWatchAdded, BugWatchRemoved, SeriesNominated, UnsubscribedFromBug)
=== modified file 'lib/lp/bugs/model/bugattachment.py'
--- lib/lp/bugs/model/bugattachment.py 2010-01-20 17:09:40 +0000
+++ lib/lp/bugs/model/bugattachment.py 2010-08-02 02:29:41 +0000
@@ -16,7 +16,7 @@
from canonical.database.enumcol import EnumCol
from canonical.database.sqlbase import SQLBase
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bugattachment import (
BugAttachmentType, IBugAttachment, IBugAttachmentSet)
=== modified file 'lib/lp/bugs/model/bugnomination.py'
--- lib/lp/bugs/model/bugnomination.py 2010-02-15 16:28:09 +0000
+++ lib/lp/bugs/model/bugnomination.py 2010-08-02 02:29:41 +0000
@@ -31,7 +31,7 @@
from lp.bugs.adapters.bugchange import BugTaskAdded
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bugnomination import (
BugNominationStatus, BugNominationStatusError, IBugNomination,
IBugNominationSet)
=== modified file 'lib/lp/bugs/model/bugset.py'
--- lib/lp/bugs/model/bugset.py 2009-09-07 10:53:24 +0000
+++ lib/lp/bugs/model/bugset.py 2010-08-02 02:29:41 +0000
@@ -8,8 +8,10 @@
from zope.interface import implements
from zope.app.form.browser.interfaces import IAddFormCustomization
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bug import IBugSet
+
+
class BugSetBase:
implements(IBugSet, IAddFormCustomization)
=== modified file 'lib/lp/bugs/model/bugtask.py'
--- lib/lp/bugs/model/bugtask.py 2010-07-21 08:15:49 +0000
+++ lib/lp/bugs/model/bugtask.py 2010-08-02 02:29:41 +0000
@@ -91,7 +91,8 @@
IPerson, validate_person_not_private_membership,
validate_public_person)
from canonical.launchpad.webapp.interfaces import (
- IStoreSelector, DEFAULT_FLAVOR, MAIN_STORE, SLAVE_FLAVOR, NotFoundError)
+ IStoreSelector, DEFAULT_FLAVOR, MAIN_STORE, SLAVE_FLAVOR)
+from lp.app.errors import NotFoundError
debbugsseveritymap = {None: BugTaskImportance.UNDECIDED,
=== modified file 'lib/lp/bugs/model/bugtracker.py'
--- lib/lp/bugs/model/bugtracker.py 2010-04-19 14:47:49 +0000
+++ lib/lp/bugs/model/bugtracker.py 2010-08-02 02:29:41 +0000
@@ -38,10 +38,10 @@
from canonical.launchpad.interfaces.lpstorm import IStore
from canonical.launchpad.validators.email import valid_email
from canonical.launchpad.validators.name import sanitize_name
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lazr.uri import URI
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bugtracker import (
BugTrackerType, IBugTracker, IBugTrackerAlias, IBugTrackerAliasSet,
IBugTrackerSet, SINGLE_PRODUCT_BUGTRACKERTYPES)
=== modified file 'lib/lp/bugs/model/bugwatch.py'
--- lib/lp/bugs/model/bugwatch.py 2010-05-19 14:03:18 +0000
+++ lib/lp/bugs/model/bugwatch.py 2010-08-02 02:29:41 +0000
@@ -43,8 +43,8 @@
from canonical.launchpad.interfaces.lpstorm import IStore
from canonical.launchpad.validators.email import valid_email
from canonical.launchpad.webapp import urlappend, urlsplit
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bugtracker import BugTrackerType, IBugTrackerSet
from lp.bugs.interfaces.bugwatch import (
BUG_WATCH_ACTIVITY_SUCCESS_STATUSES, BugWatchActivityStatus,
=== modified file 'lib/lp/bugs/scripts/bugzilla.py'
--- lib/lp/bugs/scripts/bugzilla.py 2010-07-22 12:17:41 +0000
+++ lib/lp/bugs/scripts/bugzilla.py 2010-08-02 02:29:41 +0000
@@ -34,7 +34,7 @@
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
from canonical.launchpad.interfaces.message import IMessageSet
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bug import CreateBugParams, IBugSet
from lp.bugs.interfaces.bugattachment import (
BugAttachmentType, IBugAttachmentSet)
=== modified file 'lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py'
--- lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py 2010-05-21 17:36:50 +0000
+++ lib/lp/bugs/scripts/checkwatches/bugwatchupdater.py 2010-08-02 02:29:41 +0000
@@ -16,13 +16,13 @@
from zope.event import notify
from canonical.launchpad.helpers import get_email_template
-from canonical.launchpad.interfaces.launchpad import (
- ILaunchpadCelebrities, NotFoundError)
+from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.interfaces.message import IMessageSet
from canonical.launchpad.webapp.publisher import canonical_url
from lazr.lifecycle.event import ObjectCreatedEvent
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bug import IBugSet
from lp.bugs.interfaces.bugwatch import BugWatchActivityStatus
from lp.bugs.scripts.checkwatches.base import (
=== modified file 'lib/lp/bugs/xmlrpc/bug.py'
--- lib/lp/bugs/xmlrpc/bug.py 2009-06-25 00:40:31 +0000
+++ lib/lp/bugs/xmlrpc/bug.py 2010-08-02 02:29:41 +0000
@@ -7,14 +7,11 @@
__all__ = ["FileBugAPI", "ExternalBugTrackerTokenAPI"]
from zope.component import getUtility
-from zope.event import notify
from zope.interface import implements
-from lazr.lifecycle.event import ObjectCreatedEvent
-
from canonical.launchpad.interfaces.authtoken import LoginTokenType
from canonical.launchpad.interfaces.logintoken import ILoginTokenSet
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bug import CreateBugParams
from lp.bugs.interfaces.externalbugtracker import IExternalBugTrackerTokenAPI
from lp.registry.interfaces.distribution import IDistributionSet
=== modified file 'lib/lp/buildmaster/model/builder.py'
--- lib/lp/buildmaster/model/builder.py 2010-06-25 00:21:34 +0000
+++ lib/lp/buildmaster/model/builder.py 2010-08-02 02:29:41 +0000
@@ -35,11 +35,11 @@
from canonical.launchpad.helpers import filenameToContentType
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
from canonical.launchpad.webapp import urlappend
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.webapp.interfaces import (
IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR, SLAVE_FLAVOR)
from canonical.lazr.utils import safe_hasattr
from canonical.librarian.utils import copy_and_close
+from lp.app.errors import NotFoundError
from lp.buildmaster.interfaces.builder import (
BuildDaemonError, BuildSlaveFailure, CannotBuild, CannotFetchFile,
CannotResumeHost, CorruptBuildCookie, IBuilder, IBuilderSet,
=== modified file 'lib/lp/buildmaster/model/buildqueue.py'
--- lib/lp/buildmaster/model/buildqueue.py 2010-05-27 18:20:21 +0000
+++ lib/lp/buildmaster/model/buildqueue.py 2010-08-02 02:29:41 +0000
@@ -25,7 +25,8 @@
from canonical.database.enumcol import EnumCol
from canonical.database.sqlbase import SQLBase, sqlvalues
from canonical.launchpad.webapp.interfaces import (
- DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE, NotFoundError)
+ DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE)
+from lp.app.errors import NotFoundError
from lp.buildmaster.interfaces.buildfarmjob import (
BuildFarmJobType, IBuildFarmJob)
from lp.buildmaster.interfaces.buildfarmjobbehavior import (
=== modified file 'lib/lp/code/browser/codeimport.py'
--- lib/lp/code/browser/codeimport.py 2010-05-25 03:13:25 +0000
+++ lib/lp/code/browser/codeimport.py 2010-08-02 02:29:41 +0000
@@ -29,6 +29,7 @@
from canonical.launchpad import _
from canonical.launchpad.fields import URIField
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
+from lp.app.errors import NotFoundError
from lp.code.enums import (
BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel,
CodeImportReviewStatus, CodeReviewNotificationLevel,
@@ -47,7 +48,6 @@
Navigation, stepto)
from canonical.launchpad.webapp.batching import BatchNavigator
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.webapp.menu import structured
from lazr.restful.interface import copy_field, use_template
from canonical.widgets import LaunchpadDropdownWidget
=== modified file 'lib/lp/code/doc/codeimport.txt'
--- lib/lp/code/doc/codeimport.txt 2010-05-27 02:19:27 +0000
+++ lib/lp/code/doc/codeimport.txt 2010-08-02 02:29:41 +0000
@@ -450,8 +450,7 @@
u':pserver:anonymous@xxxxxxxxxxxxxxx:/cvsroot'
When you ask for an id that is not present ICodeImportSet.get() raises
-canonical.launchpad.interfaces.NotFoundError, rather than some
-internal database exception.
+lp.app.errors.NotFoundError, rather than some internal database exception.
>>> code_import_set.get(-10)
Traceback (most recent call last):
=== modified file 'lib/lp/code/interfaces/branch.py'
--- lib/lp/code/interfaces/branch.py 2010-07-25 12:55:56 +0000
+++ lib/lp/code/interfaces/branch.py 2010-08-02 02:29:41 +0000
@@ -59,9 +59,9 @@
ParticipatingPersonChoice, PublicPersonChoice, URIField, Whiteboard)
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.validators import LaunchpadValidationError
-from canonical.launchpad.webapp.interfaces import (
- ITableBatchNavigator, NameLookupFailed)
+from canonical.launchpad.webapp.interfaces import ITableBatchNavigator
from canonical.launchpad.webapp.menu import structured
+from lp.app.errors import NameLookupFailed
from lp.code.bzr import BranchFormat, ControlFormat, RepositoryFormat
from lp.code.enums import (
BranchLifecycleStatus,
=== modified file 'lib/lp/code/model/codeimport.py'
--- lib/lp/code/model/codeimport.py 2010-04-04 16:30:41 +0000
+++ lib/lp/code/model/codeimport.py 2010-08-02 02:29:41 +0000
@@ -33,7 +33,7 @@
from canonical.database.sqlbase import SQLBase
from canonical.launchpad.interfaces import IStore
from lp.code.model.codeimportjob import CodeImportJobWorkflow
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.code.enums import (
BranchType, CodeImportJobState, CodeImportResultStatus,
CodeImportReviewStatus, RevisionControlSystems)
=== modified file 'lib/lp/code/model/diff.py'
--- lib/lp/code/model/diff.py 2010-06-04 16:15:38 +0000
+++ lib/lp/code/model/diff.py 2010-08-02 02:29:41 +0000
@@ -28,7 +28,7 @@
from uuid import uuid1
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
-from canonical.launchpad.interfaces.launchpad import NotFoundError
+from lp.app.errors import NotFoundError
from lp.code.interfaces.diff import (
IDiff, IPreviewDiff, IStaticDiff, IStaticDiffSource)
=== modified file 'lib/lp/code/model/sourcepackagerecipebuild.py'
--- lib/lp/code/model/sourcepackagerecipebuild.py 2010-07-30 19:27:25 +0000
+++ lib/lp/code/model/sourcepackagerecipebuild.py 2010-08-02 02:29:41 +0000
@@ -19,7 +19,6 @@
from canonical.database.datetimecol import UtcDateTimeCol
from canonical.database.enumcol import DBEnum
from canonical.launchpad.interfaces.lpstorm import IMasterStore, IStore
-from canonical.launchpad.interfaces.launchpad import NotFoundError
from storm.locals import Int, Reference, Storm, TimeDelta, Unicode
from storm.store import Store
@@ -28,6 +27,7 @@
from zope.interface import classProvides, implements
from canonical.launchpad.webapp import errorlog
+from lp.app.errors import NotFoundError
from lp.buildmaster.interfaces.buildbase import BuildStatus, IBuildBase
from lp.buildmaster.interfaces.buildfarmjob import BuildFarmJobType
from lp.buildmaster.model.buildbase import BuildBase
=== modified file 'lib/lp/code/model/tests/test_diff.py'
--- lib/lp/code/model/tests/test_diff.py 2010-05-15 17:43:59 +0000
+++ lib/lp/code/model/tests/test_diff.py 2010-08-02 02:29:41 +0000
@@ -17,10 +17,10 @@
from zope.security.proxy import removeSecurityProxy
-from canonical.launchpad.interfaces.launchpad import NotFoundError
-from canonical.launchpad.webapp import canonical_url, errorlog
+from canonical.launchpad.webapp import canonical_url
from canonical.launchpad.webapp.testing import verifyObject
from canonical.testing import LaunchpadFunctionalLayer, LaunchpadZopelessLayer
+from lp.app.errors import NotFoundError
from lp.code.model.diff import Diff, PreviewDiff, StaticDiff
from lp.code.model.directbranchcommit import DirectBranchCommit
from lp.code.interfaces.diff import (
=== modified file 'lib/lp/code/model/tests/test_sourcepackagerecipebuild.py'
--- lib/lp/code/model/tests/test_sourcepackagerecipebuild.py 2010-08-01 04:34:26 +0000
+++ lib/lp/code/model/tests/test_sourcepackagerecipebuild.py 2010-08-02 02:29:41 +0000
@@ -19,10 +19,10 @@
from canonical.testing.layers import (
LaunchpadFunctionalLayer, LaunchpadZopelessLayer)
-from canonical.launchpad.interfaces.launchpad import NotFoundError
from canonical.launchpad.interfaces.lpstorm import IStore
from canonical.launchpad.webapp.authorization import check_permission
from canonical.launchpad.webapp.testing import verifyObject
+from lp.app.errors import NotFoundError
from lp.buildmaster.interfaces.buildbase import BuildStatus, IBuildBase
from lp.buildmaster.interfaces.buildqueue import IBuildQueue
from lp.buildmaster.tests.test_buildbase import (
=== modified file 'lib/lp/code/xmlrpc/branch.py'
--- lib/lp/code/xmlrpc/branch.py 2010-02-21 21:13:34 +0000
+++ lib/lp/code/xmlrpc/branch.py 2010-08-02 02:29:41 +0000
@@ -18,8 +18,9 @@
from zope.interface import Interface, implements
from canonical.config import config
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bug import IBugSet
-from canonical.launchpad.webapp.interfaces import ILaunchBag, NotFoundError
+from canonical.launchpad.webapp.interfaces import ILaunchBag
from lp.code.enums import BranchType
from lp.code.interfaces.branch import (
BranchCreationException, BranchCreationForbidden, IBranch)
=== modified file 'lib/lp/code/xmlrpc/codehosting.py'
--- lib/lp/code/xmlrpc/codehosting.py 2010-07-27 05:30:04 +0000
+++ lib/lp/code/xmlrpc/codehosting.py 2010-08-02 02:29:41 +0000
@@ -26,11 +26,10 @@
from canonical.launchpad.webapp import LaunchpadXMLRPCView
from canonical.launchpad.webapp.authorization import check_permission
from canonical.launchpad.webapp.interaction import setupInteractionForPerson
-from canonical.launchpad.webapp.interfaces import (
- NameLookupFailed, NotFoundError)
from canonical.launchpad.xmlrpc import faults
from canonical.launchpad.xmlrpc.helpers import return_fault
+from lp.app.errors import NameLookupFailed, NotFoundError
from lp.code.errors import UnknownBranchTypeError
from lp.code.bzr import BranchFormat, ControlFormat, RepositoryFormat
from lp.code.enums import BranchType
=== modified file 'lib/lp/code/xmlrpc/tests/test_codehosting.py'
--- lib/lp/code/xmlrpc/tests/test_codehosting.py 2010-07-28 04:18:53 +0000
+++ lib/lp/code/xmlrpc/tests/test_codehosting.py 2010-08-02 02:29:41 +0000
@@ -24,10 +24,10 @@
from canonical.launchpad.interfaces.launchpad import ILaunchBag
from lp.testing import TestCaseWithFactory
from lp.testing.factory import LaunchpadObjectFactory
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.xmlrpc import faults
from canonical.testing import DatabaseFunctionalLayer, FunctionalLayer
+from lp.app.errors import NotFoundError
from lp.code.bzr import BranchFormat, ControlFormat, RepositoryFormat
from lp.code.enums import BranchType
from lp.code.errors import UnknownBranchTypeError
=== modified file 'lib/lp/codehosting/scanner/buglinks.py'
--- lib/lp/codehosting/scanner/buglinks.py 2010-03-02 18:56:25 +0000
+++ lib/lp/codehosting/scanner/buglinks.py 2010-08-02 02:29:41 +0000
@@ -14,7 +14,8 @@
from zope.component import getUtility
from canonical.launchpad.interfaces import (
- IBugSet, ILaunchpadCelebrities, NotFoundError)
+ IBugSet, ILaunchpadCelebrities)
+from lp.app.errors import NotFoundError
class BugBranchLinker:
=== modified file 'lib/lp/codehosting/scanner/tests/test_buglinks.py'
--- lib/lp/codehosting/scanner/tests/test_buglinks.py 2010-04-23 07:27:01 +0000
+++ lib/lp/codehosting/scanner/tests/test_buglinks.py 2010-08-02 02:29:41 +0000
@@ -12,10 +12,10 @@
from zope.component import getUtility
from canonical.config import config
-from canonical.launchpad.interfaces import (
- IBugBranchSet, IBugSet, NotFoundError)
+from canonical.launchpad.interfaces import IBugBranchSet, IBugSet
from canonical.testing.layers import LaunchpadZopelessLayer
+from lp.app.errors import NotFoundError
from lp.code.interfaces.revision import IRevisionSet
from lp.codehosting.scanner import events
from lp.codehosting.scanner.buglinks import BugBranchLinker
=== modified file 'lib/lp/hardwaredb/browser/hwdb.py'
--- lib/lp/hardwaredb/browser/hwdb.py 2010-02-02 17:12:29 +0000
+++ lib/lp/hardwaredb/browser/hwdb.py 2010-08-02 02:29:41 +0000
@@ -20,8 +20,9 @@
from z3c.ptcompat import ViewPageTemplateFile
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.distribution import IDistributionSet
-from canonical.launchpad.interfaces.launchpad import ILaunchBag, NotFoundError
+from canonical.launchpad.interfaces.launchpad import ILaunchBag
from lp.hardwaredb.interfaces.hwdb import (
HWSubmissionMissingFields, IHWDBApplication, IHWDeviceClassSet,
IHWDeviceSet, IHWDriverSet, IHWSubmissionDeviceSet, IHWSubmissionForm,
=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py 2010-06-28 14:41:21 +0000
+++ lib/lp/registry/browser/distribution.py 2010-08-02 02:29:41 +0000
@@ -80,14 +80,14 @@
enabled_with_permission, GetitemNavigation,
LaunchpadFormView, LaunchpadView, Link, Navigation, redirection,
StandardLaunchpadFacets, stepthrough, stepto)
-from canonical.launchpad.webapp.interfaces import (
- ILaunchBag, NotFoundError)
+from canonical.launchpad.webapp.interfaces import ILaunchBag
from canonical.launchpad.helpers import english_list
from canonical.launchpad.webapp import NavigationMenu
from canonical.launchpad.webapp.batching import BatchNavigator
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
from canonical.widgets.image import ImageChangeWidget
+from lp.app.errors import NotFoundError
from lp.registry.browser import RegistryEditFormView
=== modified file 'lib/lp/registry/browser/distroseries.py'
--- lib/lp/registry/browser/distroseries.py 2010-07-28 02:02:25 +0000
+++ lib/lp/registry/browser/distroseries.py 2010-08-02 02:29:41 +0000
@@ -28,6 +28,7 @@
from canonical.database.constants import UTC_NOW
from canonical.launchpad import _
from canonical.launchpad import helpers
+from lp.app.errors import NotFoundError
from lp.blueprints.browser.specificationtarget import (
HasSpecificationsMenuMixin)
from lp.bugs.browser.bugtask import BugTargetTraversalMixin
@@ -41,8 +42,7 @@
from lp.registry.browser.structuralsubscription import (
StructuralSubscriptionMenuMixin,
StructuralSubscriptionTargetTraversalMixin)
-from canonical.launchpad.interfaces.launchpad import (
- ILaunchBag, NotFoundError)
+from canonical.launchpad.interfaces.launchpad import ILaunchBag
from canonical.launchpad.webapp import (
StandardLaunchpadFacets, GetitemNavigation, action, custom_widget)
from canonical.launchpad.webapp.authorization import check_permission
=== modified file 'lib/lp/registry/browser/mailinglists.py'
--- lib/lp/registry/browser/mailinglists.py 2010-01-12 16:27:46 +0000
+++ lib/lp/registry/browser/mailinglists.py 2010-08-02 02:29:41 +0000
@@ -22,12 +22,12 @@
from canonical.cachedproperty import cachedproperty
from canonical.launchpad import _
+from lp.app.errors import UnexpectedFormData
from lp.registry.interfaces.mailinglist import (
IHeldMessageDetails, IMailingListSet, MailingListStatus)
from lp.registry.interfaces.person import ITeam
from canonical.launchpad.webapp import (
LaunchpadFormView, LaunchpadView, action, canonical_url)
-from canonical.launchpad.webapp.interfaces import UnexpectedFormData
from canonical.launchpad.webapp.menu import structured
from canonical.launchpad.webapp.tales import PersonFormatterAPI
=== modified file 'lib/lp/registry/browser/person.py'
--- lib/lp/registry/browser/person.py 2010-07-16 16:14:39 +0000
+++ lib/lp/registry/browser/person.py 2010-08-02 02:29:41 +0000
@@ -149,8 +149,9 @@
from canonical.launchpad.interfaces.oauth import IOAuthConsumerSet
from lp.blueprints.interfaces.specification import SpecificationFilter
from canonical.launchpad.webapp.interfaces import (
- ILaunchBag, IOpenLaunchBag, NotFoundError, UnexpectedFormData)
+ ILaunchBag, IOpenLaunchBag)
from lp.answers.interfaces.questionenums import QuestionParticipation
+from lp.app.errors import NotFoundError, UnexpectedFormData
from lp.code.browser.sourcepackagerecipelisting import HasRecipesMenuMixin
from lp.registry.interfaces.codeofconduct import ISignedCodeOfConductSet
from lp.registry.interfaces.gpg import IGPGKeySet
=== modified file 'lib/lp/registry/browser/personproduct.py'
--- lib/lp/registry/browser/personproduct.py 2010-05-11 17:43:20 +0000
+++ lib/lp/registry/browser/personproduct.py 2010-08-02 02:29:41 +0000
@@ -14,13 +14,13 @@
from zope.component import queryAdapter
from zope.traversing.interfaces import IPathAdapter
+from lp.app.errors import NotFoundError
from lp.code.interfaces.branchnamespace import (
get_branch_namespace)
from lp.registry.interfaces.personproduct import IPersonProduct
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
from canonical.launchpad.webapp import (
Link, Navigation, StandardLaunchpadFacets)
-from canonical.launchpad.webapp.interfaces import NotFoundError
class PersonProductNavigation(Navigation):
=== modified file 'lib/lp/registry/browser/product.py'
--- lib/lp/registry/browser/product.py 2010-07-09 10:22:32 +0000
+++ lib/lp/registry/browser/product.py 2010-08-02 02:29:41 +0000
@@ -69,6 +69,7 @@
from lazr.restful.interface import copy_field
from canonical.launchpad import _
from canonical.launchpad.fields import PillarAliases, PublicPersonChoice
+from lp.app.errors import NotFoundError
from lp.app.interfaces.headings import IEditableContextTitle
from lp.blueprints.browser.specificationtarget import (
HasSpecificationsMenuMixin)
@@ -78,7 +79,7 @@
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
from canonical.launchpad.webapp.interfaces import (
- ILaunchBag, NotFoundError, UnsafeFormGetSubmissionError)
+ ILaunchBag, UnsafeFormGetSubmissionError)
from lp.registry.interfaces.pillar import IPillarNameSet
from lp.registry.interfaces.product import IProductReviewSearch, License
from lp.registry.interfaces.series import SeriesStatus
=== modified file 'lib/lp/registry/browser/productseries.py'
--- lib/lp/registry/browser/productseries.py 2010-07-08 19:42:39 +0000
+++ lib/lp/registry/browser/productseries.py 2010-08-02 02:29:41 +0000
@@ -80,8 +80,7 @@
stepto)
from canonical.launchpad.webapp.authorization import check_permission
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.interfaces import (
- NotFoundError, UnexpectedFormData)
+from lp.app.errors import NotFoundError, UnexpectedFormData
from canonical.launchpad.webapp.launchpadform import (
action, custom_widget, LaunchpadEditFormView, LaunchpadFormView,
ReturnToReferrerMixin)
=== modified file 'lib/lp/registry/browser/project.py'
--- lib/lp/registry/browser/project.py 2010-06-14 15:52:41 +0000
+++ lib/lp/registry/browser/project.py 2010-08-02 02:29:41 +0000
@@ -42,7 +42,7 @@
from canonical.cachedproperty import cachedproperty
from canonical.launchpad import _
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from canonical.launchpad.webapp.menu import NavigationMenu
from lp.blueprints.browser.specificationtarget import (
HasSpecificationsMenuMixin)
=== modified file 'lib/lp/registry/browser/team.py'
--- lib/lp/registry/browser/team.py 2010-07-16 16:14:39 +0000
+++ lib/lp/registry/browser/team.py 2010-08-02 02:29:41 +0000
@@ -38,6 +38,7 @@
from canonical.widgets import HiddenUserWidget, LaunchpadRadioWidget
from canonical.launchpad import _
+from lp.app.errors import UnexpectedFormData
from lp.registry.browser.branding import BrandingChangeView
from canonical.launchpad.fields import PublicPersonChoice
from canonical.launchpad.validators import LaunchpadValidationError
@@ -48,8 +49,7 @@
from canonical.launchpad.webapp.authorization import check_permission
from canonical.launchpad.webapp.badge import HasBadgeBase
from canonical.launchpad.webapp.batching import BatchNavigator
-from canonical.launchpad.webapp.interfaces import (
- ILaunchBag, UnexpectedFormData)
+from canonical.launchpad.webapp.interfaces import ILaunchBag
from canonical.launchpad.webapp.menu import structured
from canonical.launchpad.webapp.tales import PersonFormatterAPI
from canonical.launchpad.interfaces.authtoken import LoginTokenType
=== modified file 'lib/lp/registry/browser/teammembership.py'
--- lib/lp/registry/browser/teammembership.py 2009-12-16 22:20:29 +0000
+++ lib/lp/registry/browser/teammembership.py 2010-08-02 02:29:41 +0000
@@ -23,10 +23,10 @@
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.webapp import LaunchpadView, canonical_url
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.interfaces import (
- ILaunchBag, UnexpectedFormData)
+from canonical.launchpad.webapp.interfaces import ILaunchBag
from canonical.widgets import DateWidget
+from lp.app.errors import UnexpectedFormData
from lp.registry.interfaces.teammembership import TeamMembershipStatus
=== modified file 'lib/lp/registry/browser/tests/test_person_view.py'
--- lib/lp/registry/browser/tests/test_person_view.py 2010-07-14 15:36:41 +0000
+++ lib/lp/registry/browser/tests/test_person_view.py 2010-08-02 02:29:41 +0000
@@ -11,7 +11,7 @@
from canonical.config import config
from canonical.launchpad.ftests import ANONYMOUS, login
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from canonical.launchpad.webapp.servers import LaunchpadTestRequest
from canonical.testing import (
DatabaseFunctionalLayer, LaunchpadFunctionalLayer, LaunchpadZopelessLayer)
=== modified file 'lib/lp/registry/doc/product.txt'
--- lib/lp/registry/doc/product.txt 2010-04-27 13:57:18 +0000
+++ lib/lp/registry/doc/product.txt 2010-08-02 02:29:41 +0000
@@ -6,8 +6,8 @@
>>> from zope.component import getUtility
>>> from canonical.launchpad.interfaces import (
- ... IProductSet, IProduct, IPersonSet,
- ... NotFoundError)
+ ... IProductSet, IProduct, IPersonSet)
+ >>> from lp.app.errors import NotFoundError
>>> from lp.translations.interfaces.translationimportqueue import (
... IHasTranslationImports)
>>> from canonical.launchpad.ftests import login
=== modified file 'lib/lp/registry/interfaces/distribution.py'
--- lib/lp/registry/interfaces/distribution.py 2010-06-29 10:17:06 +0000
+++ lib/lp/registry/interfaces/distribution.py 2010-08-02 02:29:41 +0000
@@ -37,6 +37,7 @@
Description, PublicPersonChoice, Summary, Title)
from lp.registry.interfaces.structuralsubscription import (
IStructuralSubscriptionTarget)
+from lp.app.errors import NameLookupFailed
from lp.app.interfaces.headings import IRootContext
from lp.registry.interfaces.announcement import IMakesAnnouncements
from lp.registry.interfaces.distributionmirror import IDistributionMirror
@@ -58,7 +59,6 @@
from lp.blueprints.interfaces.sprint import IHasSprints
from lp.translations.interfaces.translationgroup import (
ITranslationPolicy)
-from canonical.launchpad.webapp.interfaces import NameLookupFailed
from canonical.launchpad.validators.name import name_validator
from canonical.launchpad.fields import (
IconImageUpload, LogoImageUpload, MugshotImageUpload, PillarNameField)
=== modified file 'lib/lp/registry/interfaces/person.py'
--- lib/lp/registry/interfaces/person.py 2010-07-16 13:34:38 +0000
+++ lib/lp/registry/interfaces/person.py 2010-08-02 02:29:41 +0000
@@ -77,9 +77,9 @@
from canonical.launchpad.validators.email import email_validator
from canonical.launchpad.validators.name import name_validator
from canonical.launchpad.webapp.authorization import check_permission
-from canonical.launchpad.webapp.interfaces import (
- ILaunchpadApplication, NameLookupFailed)
+from canonical.launchpad.webapp.interfaces import ILaunchpadApplication
+from lp.app.errors import NameLookupFailed
from lp.app.interfaces.headings import IRootContext
from lp.blueprints.interfaces.specificationtarget import (
IHasSpecifications)
=== modified file 'lib/lp/registry/interfaces/product.py'
--- lib/lp/registry/interfaces/product.py 2010-07-09 10:22:32 +0000
+++ lib/lp/registry/interfaces/product.py 2010-08-02 02:29:41 +0000
@@ -38,6 +38,7 @@
Description, IconImageUpload, LogoImageUpload, MugshotImageUpload,
ParticipatingPersonChoice, ProductBugTracker, ProductNameField,
PublicPersonChoice, Summary, Title, URIField)
+from lp.app.errors import NameLookupFailed
from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
from lp.bugs.interfaces.securitycontact import IHasSecurityContact
from lp.registry.interfaces.structuralsubscription import (
@@ -72,7 +73,6 @@
ITranslationPolicy)
from canonical.launchpad.validators import LaunchpadValidationError
from canonical.launchpad.validators.name import name_validator
-from canonical.launchpad.webapp.interfaces import NameLookupFailed
from lazr.restful.fields import CollectionField, Reference, ReferenceChoice
from lazr.restful.declarations import (
REQUEST_USER, call_with, collection_default_content,
=== modified file 'lib/lp/registry/interfaces/productseries.py'
--- lib/lp/registry/interfaces/productseries.py 2010-06-11 18:05:59 +0000
+++ lib/lp/registry/interfaces/productseries.py 2010-08-02 02:29:41 +0000
@@ -22,6 +22,7 @@
ContentNameField, ParticipatingPersonChoice, Title)
from lp.registry.interfaces.structuralsubscription import (
IStructuralSubscriptionTarget)
+from lp.app.errors import NameLookupFailed
from lp.code.interfaces.branch import IBranch
from lp.bugs.interfaces.bugtarget import IBugTarget, IHasOfficialBugTags
from lp.registry.interfaces.series import ISeriesMixin, SeriesStatus
@@ -39,7 +40,6 @@
from canonical.launchpad.validators import LaunchpadValidationError
from canonical.launchpad.validators.name import name_validator
-from canonical.launchpad.webapp.interfaces import NameLookupFailed
from canonical.launchpad.webapp.url import urlparse
from canonical.launchpad import _
=== modified file 'lib/lp/registry/interfaces/sourcepackagename.py'
--- lib/lp/registry/interfaces/sourcepackagename.py 2009-07-25 16:33:39 +0000
+++ lib/lp/registry/interfaces/sourcepackagename.py 2010-08-02 02:29:41 +0000
@@ -18,7 +18,7 @@
from canonical.launchpad import _
from canonical.launchpad.validators.name import name_validator
-from canonical.launchpad.webapp.interfaces import NameLookupFailed
+from lp.app.errors import NameLookupFailed
from lazr.restful.declarations import webservice_error
=== modified file 'lib/lp/registry/model/codeofconduct.py'
--- lib/lp/registry/model/codeofconduct.py 2009-12-01 14:16:35 +0000
+++ lib/lp/registry/model/codeofconduct.py 2010-08-02 02:29:41 +0000
@@ -29,7 +29,7 @@
from canonical.launchpad.interfaces.gpghandler import (
GPGVerificationError, IGPGHandler)
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.codeofconduct import (
ICodeOfConduct, ICodeOfConductConf, ICodeOfConductSet,
ISignedCodeOfConduct, ISignedCodeOfConductSet)
=== modified file 'lib/lp/registry/model/distribution.py'
--- lib/lp/registry/model/distribution.py 2010-06-29 10:17:06 +0000
+++ lib/lp/registry/model/distribution.py 2010-08-02 02:29:41 +0000
@@ -106,7 +106,7 @@
from lp.translations.interfaces.translationgroup import (
TranslationPermission)
from canonical.launchpad.validators.name import sanitize_name, valid_name
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.person import (
validate_person_not_private_membership, validate_public_person)
from canonical.launchpad.webapp.url import urlparse
=== modified file 'lib/lp/registry/model/distroseries.py'
--- lib/lp/registry/model/distroseries.py 2010-07-29 15:16:43 +0000
+++ lib/lp/registry/model/distroseries.py 2010-08-02 02:29:41 +0000
@@ -35,6 +35,7 @@
quote, SQLBase, sqlvalues)
from canonical.launchpad.components.decoratedresultset import (
DecoratedResultSet)
+from lp.app.errors import NotFoundError
from lp.translations.model.pofiletranslator import (
POFileTranslator)
from lp.translations.model.pofile import POFile
@@ -118,7 +119,7 @@
from canonical.launchpad.mail import signed_message_from_string
from lp.registry.interfaces.person import validate_public_person
from canonical.launchpad.webapp.interfaces import (
- IStoreSelector, MAIN_STORE, NotFoundError, SLAVE_FLAVOR)
+ IStoreSelector, MAIN_STORE, SLAVE_FLAVOR)
from lp.soyuz.interfaces.sourcepackageformat import (
ISourcePackageFormatSelectionSet)
=== modified file 'lib/lp/registry/model/entitlement.py'
--- lib/lp/registry/model/entitlement.py 2009-06-25 04:06:00 +0000
+++ lib/lp/registry/model/entitlement.py 2010-08-02 02:29:41 +0000
@@ -19,7 +19,7 @@
from canonical.database.datetimecol import UtcDateTimeCol
from canonical.database.enumcol import EnumCol
from canonical.database.sqlbase import SQLBase
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.entitlement import (
EntitlementInvalidError, EntitlementQuota, EntitlementQuotaExceededError,
EntitlementState, EntitlementType, IEntitlement, IEntitlementSet)
=== modified file 'lib/lp/registry/model/karma.py'
--- lib/lp/registry/model/karma.py 2010-04-19 09:39:29 +0000
+++ lib/lp/registry/model/karma.py 2010-08-02 02:29:41 +0000
@@ -27,8 +27,8 @@
from canonical.database.datetimecol import UtcDateTimeCol
from canonical.database.constants import UTC_NOW
from canonical.launchpad.event.interfaces import IKarmaAssignedEvent
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.karma import (
IKarma, IKarmaAction, IKarmaActionSet, IKarmaCache, IKarmaCacheManager,
=== modified file 'lib/lp/registry/model/milestone.py'
--- lib/lp/registry/model/milestone.py 2010-02-17 11:13:06 +0000
+++ lib/lp/registry/model/milestone.py 2010-08-02 02:29:41 +0000
@@ -25,6 +25,7 @@
from canonical.database.sqlbase import SQLBase, sqlvalues
from canonical.launchpad.webapp.sorting import expand_numbers
+from lp.app.errors import NotFoundError
from lp.bugs.model.bugtarget import HasBugsBase
from lp.blueprints.model.specification import Specification
from lp.registry.model.productrelease import ProductRelease
@@ -35,7 +36,6 @@
from lp.bugs.interfaces.bugtarget import IHasBugs
from lp.registry.interfaces.milestone import (
IHasMilestones, IMilestone, IMilestoneSet, IProjectGroupMilestone)
-from canonical.launchpad.webapp.interfaces import NotFoundError
FUTURE_NONE = datetime.date(datetime.MAXYEAR, 1, 1)
=== modified file 'lib/lp/registry/model/pillar.py'
--- lib/lp/registry/model/pillar.py 2010-04-19 09:39:29 +0000
+++ lib/lp/registry/model/pillar.py 2010-08-02 02:29:41 +0000
@@ -23,9 +23,9 @@
from canonical.config import config
from canonical.database.sqlbase import cursor, SQLBase, sqlvalues
+from lp.app.errors import NotFoundError
from lp.registry.model.featuredproject import FeaturedProject
from lp.registry.model.productlicense import ProductLicense
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.registry.interfaces.distribution import (
IDistribution, IDistributionSet)
from lp.registry.interfaces.pillar import IPillarName, IPillarNameSet
=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py 2010-07-09 10:22:32 +0000
+++ lib/lp/registry/model/product.py 2010-08-02 02:29:41 +0000
@@ -31,6 +31,7 @@
from canonical.database.enumcol import EnumCol
from canonical.database.sqlbase import quote, SQLBase, sqlvalues
from canonical.launchpad.interfaces.lpstorm import IStore
+from lp.app.errors import NotFoundError
from lp.code.model.branchvisibilitypolicy import (
BranchVisibilityPolicyMixin)
from lp.code.model.hasbranches import (
@@ -78,14 +79,11 @@
HasTranslationImportsMixin)
from lp.registry.model.structuralsubscription import (
StructuralSubscriptionTargetMixin)
-from canonical.launchpad.helpers import shortlist
-from lp.code.interfaces.branch import (
- DEFAULT_BRANCH_STATUS_IN_LISTING, IBranchSet)
+from lp.code.interfaces.branch import DEFAULT_BRANCH_STATUS_IN_LISTING
from lp.bugs.interfaces.bugsupervisor import IHasBugSupervisor
from canonical.launchpad.interfaces.launchpad import (
- IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage,
- NotFoundError)
+ IHasIcon, IHasLogo, IHasMugshot, ILaunchpadCelebrities, ILaunchpadUsage)
from lp.translations.interfaces.customlanguagecode import (
IHasCustomLanguageCodes)
from canonical.launchpad.interfaces.launchpadstatistic import (
=== modified file 'lib/lp/registry/model/productrelease.py'
--- lib/lp/registry/model/productrelease.py 2009-11-24 21:27:17 +0000
+++ lib/lp/registry/model/productrelease.py 2010-08-02 02:29:41 +0000
@@ -25,7 +25,7 @@
from canonical.database.datetimecol import UtcDateTimeCol
from canonical.database.enumcol import EnumCol
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.productrelease import (
IProductRelease, IProductReleaseFile, IProductReleaseSet,
UpstreamFileType)
=== modified file 'lib/lp/registry/model/productseries.py'
--- lib/lp/registry/model/productseries.py 2010-07-24 11:31:11 +0000
+++ lib/lp/registry/model/productseries.py 2010-08-02 02:29:41 +0000
@@ -26,6 +26,7 @@
from canonical.database.enumcol import EnumCol
from canonical.database.sqlbase import (
SQLBase, quote, sqlvalues)
+from lp.app.errors import NotFoundError
from lp.bugs.interfaces.bugtarget import IHasBugHeat
from lp.bugs.model.bugtarget import BugTargetBase, HasBugHeatMixin
from lp.bugs.model.bug import (
@@ -57,7 +58,6 @@
SpecificationDefinitionStatus, SpecificationFilter,
SpecificationGoalStatus, SpecificationImplementationStatus,
SpecificationSort)
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.registry.interfaces.series import SeriesStatus
from lp.registry.interfaces.productseries import (
IProductSeries, IProductSeriesSet)
=== modified file 'lib/lp/registry/model/projectgroup.py'
--- lib/lp/registry/model/projectgroup.py 2010-05-24 13:54:12 +0000
+++ lib/lp/registry/model/projectgroup.py 2010-08-02 02:29:41 +0000
@@ -27,13 +27,13 @@
from canonical.launchpad.interfaces.launchpad import (
IHasIcon, IHasLogo, IHasMugshot)
+from lp.app.errors import NotFoundError
from lp.blueprints.interfaces.specification import (
SpecificationFilter, SpecificationImplementationStatus, SpecificationSort)
from lp.blueprints.interfaces.sprintspecification import (
SprintSpecificationStatus)
from lp.translations.interfaces.translationgroup import (
TranslationPermission)
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.answers.interfaces.faqcollection import IFAQCollection
from lp.answers.interfaces.questioncollection import (
ISearchableByQuestionOwner, QUESTION_STATUS_DEFAULT_SEARCH)
=== modified file 'lib/lp/registry/model/sourcepackagename.py'
--- lib/lp/registry/model/sourcepackagename.py 2010-05-21 15:13:06 +0000
+++ lib/lp/registry/model/sourcepackagename.py 2010-08-02 02:29:41 +0000
@@ -17,7 +17,7 @@
from canonical.database.sqlbase import SQLBase, quote_like, cursor, sqlvalues
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.sourcepackagename import (
ISourcePackageName, ISourcePackageNameSet, NoSuchSourcePackageName)
=== modified file 'lib/lp/registry/scripts/entitlement.py'
--- lib/lp/registry/scripts/entitlement.py 2009-06-25 04:06:00 +0000
+++ lib/lp/registry/scripts/entitlement.py 2010-08-02 02:29:41 +0000
@@ -25,7 +25,7 @@
import pytz
from zope.component import getUtility
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.entitlement import (
EntitlementState, EntitlementType, IEntitlementSet)
from lp.registry.interfaces.person import IPersonSet
=== modified file 'lib/lp/registry/tests/test_milestone.py'
--- lib/lp/registry/tests/test_milestone.py 2009-06-30 16:56:07 +0000
+++ lib/lp/registry/tests/test_milestone.py 2010-08-02 02:29:41 +0000
@@ -9,11 +9,11 @@
from zope.component import getUtility
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.milestone import IMilestoneSet
from lp.registry.interfaces.product import IProductSet
from canonical.launchpad.ftests import login, logout, ANONYMOUS
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.testing import LaunchpadFunctionalLayer
=== modified file 'lib/lp/scripts/utilities/importfascist.py'
--- lib/lp/scripts/utilities/importfascist.py 2010-07-19 18:02:50 +0000
+++ lib/lp/scripts/utilities/importfascist.py 2010-08-02 02:29:41 +0000
@@ -171,7 +171,7 @@
def format_message(self):
return ('%s\nDo not import zope.exceptions.NotFoundError.\n'
- 'Use canonical.launchpad.interfaces.NotFoundError instead.'
+ 'Use lp.app.errors.NotFoundError instead.'
% self.import_into)
=== modified file 'lib/lp/services/apachelogparser/script.py'
--- lib/lp/services/apachelogparser/script.py 2009-09-11 10:34:40 +0000
+++ lib/lp/services/apachelogparser/script.py 2010-08-02 02:29:41 +0000
@@ -8,7 +8,7 @@
from zope.component import getUtility
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.services.apachelogparser.base import (
create_or_update_parsedlog_entry, get_files_to_parse, parse_file)
from lp.services.scripts.base import LaunchpadCronScript
=== modified file 'lib/lp/services/worlddata/model/country.py'
--- lib/lp/services/worlddata/model/country.py 2010-02-22 14:06:46 +0000
+++ lib/lp/services/worlddata/model/country.py 2010-08-02 02:29:41 +0000
@@ -12,8 +12,8 @@
from canonical.database.constants import DEFAULT
from canonical.database.sqlbase import SQLBase
-from canonical.launchpad.interfaces import NotFoundError
from canonical.launchpad.interfaces.lpstorm import IStore
+from lp.app.errors import NotFoundError
from lp.services.worlddata.interfaces.country import (
ICountry, ICountrySet, IContinent)
=== modified file 'lib/lp/services/worlddata/model/language.py'
--- lib/lp/services/worlddata/model/language.py 2010-03-09 18:51:26 +0000
+++ lib/lp/services/worlddata/model/language.py 2010-08-02 02:29:41 +0000
@@ -16,12 +16,10 @@
from storm.locals import Or
from zope.interface import implements
-from canonical.cachedproperty import cachedproperty
-
from canonical.database.sqlbase import SQLBase, sqlvalues
from canonical.database.enumcol import EnumCol
from canonical.launchpad.interfaces import ISlaveStore
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.services.worlddata.interfaces.language import (
ILanguage, ILanguageSet, TextDirection)
=== modified file 'lib/lp/soyuz/adapters/packagelocation.py'
--- lib/lp/soyuz/adapters/packagelocation.py 2010-06-22 12:49:42 +0000
+++ lib/lp/soyuz/adapters/packagelocation.py 2010-08-02 02:29:41 +0000
@@ -14,7 +14,7 @@
from zope.component import getUtility
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
class PackageLocation:
=== modified file 'lib/lp/soyuz/browser/archive.py'
--- lib/lp/soyuz/browser/archive.py 2010-07-20 10:25:51 +0000
+++ lib/lp/soyuz/browser/archive.py 2010-08-02 02:29:41 +0000
@@ -49,6 +49,7 @@
from canonical.launchpad.components.tokens import create_token
from canonical.launchpad.helpers import english_list
from canonical.lazr.utils import smartquote
+from lp.app.errors import NotFoundError
from lp.buildmaster.interfaces.buildbase import BuildStatus
from lp.services.browser_helpers import get_user_agent_distroseries
from lp.services.worlddata.interfaces.country import ICountrySet
@@ -72,8 +73,7 @@
from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
from lp.soyuz.interfaces.component import IComponentSet
from lp.registry.interfaces.series import SeriesStatus
-from canonical.launchpad.interfaces.launchpad import (
- ILaunchpadCelebrities, NotFoundError)
+from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from lp.soyuz.interfaces.packagecopyrequest import (
IPackageCopyRequestSet)
from lp.soyuz.interfaces.packageset import IPackagesetSet
=== modified file 'lib/lp/soyuz/browser/build.py'
--- lib/lp/soyuz/browser/build.py 2010-06-16 13:37:42 +0000
+++ lib/lp/soyuz/browser/build.py 2010-08-02 02:29:41 +0000
@@ -32,12 +32,12 @@
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
from canonical.launchpad.webapp.interfaces import ICanonicalUrlData
from canonical.lazr.utils import safe_hasattr
+from lp.app.errors import UnexpectedFormData
from lp.buildmaster.interfaces.buildbase import BuildStatus
from lp.services.job.interfaces.job import JobStatus
from lp.soyuz.interfaces.binarypackagebuild import (
IBinaryPackageBuild, IBuildRescoreForm, IBinaryPackageBuildSet)
from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
-from canonical.launchpad.interfaces.launchpad import UnexpectedFormData
from lp.soyuz.interfaces.queue import PackageUploadStatus
=== modified file 'lib/lp/soyuz/browser/builder.py'
--- lib/lp/soyuz/browser/builder.py 2010-06-16 13:37:42 +0000
+++ lib/lp/soyuz/browser/builder.py 2010-08-02 02:29:41 +0000
@@ -28,10 +28,10 @@
from canonical.cachedproperty import cachedproperty
from canonical.lazr.utils import smartquote
from canonical.launchpad import _
+from lp.app.errors import NotFoundError
+from lp.buildmaster.interfaces.builder import IBuilderSet, IBuilder
from lp.soyuz.browser.build import BuildRecordsView
from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
-from lp.buildmaster.interfaces.builder import IBuilderSet, IBuilder
-from canonical.launchpad.interfaces.launchpad import NotFoundError
from canonical.launchpad.webapp import (
ApplicationMenu, GetitemNavigation, LaunchpadEditFormView,
LaunchpadFormView, LaunchpadView, Link, Navigation,
=== modified file 'lib/lp/soyuz/browser/distributionsourcepackagerelease.py'
--- lib/lp/soyuz/browser/distributionsourcepackagerelease.py 2010-05-14 08:45:43 +0000
+++ lib/lp/soyuz/browser/distributionsourcepackagerelease.py 2010-08-02 02:29:41 +0000
@@ -19,7 +19,7 @@
from canonical.launchpad.webapp import (
LaunchpadView, Navigation, stepthrough)
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.archivepublisher.debversion import Version
from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
from lp.soyuz.interfaces.distributionsourcepackagerelease import (
=== modified file 'lib/lp/soyuz/browser/queue.py'
--- lib/lp/soyuz/browser/queue.py 2010-03-17 02:25:13 +0000
+++ lib/lp/soyuz/browser/queue.py 2010-08-02 02:29:41 +0000
@@ -14,10 +14,9 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.errors import NotFoundError, UnexpectedFormData
from lp.soyuz.interfaces.component import IComponentSet
from lp.soyuz.interfaces.section import ISectionSet
-from canonical.launchpad.webapp.interfaces import (
- NotFoundError, UnexpectedFormData)
from lp.soyuz.interfaces.archivepermission import IArchivePermissionSet
from lp.soyuz.interfaces.queue import PackageUploadStatus
from lp.soyuz.interfaces.publishing import PackagePublishingPriority
=== modified file 'lib/lp/soyuz/interfaces/archive.py'
--- lib/lp/soyuz/interfaces/archive.py 2010-07-27 12:28:46 +0000
+++ lib/lp/soyuz/interfaces/archive.py 2010-08-02 02:29:41 +0000
@@ -55,13 +55,13 @@
from canonical.launchpad.fields import (
ParticipatingPersonChoice, PublicPersonChoice, StrippedTextLine)
from canonical.launchpad.interfaces.launchpad import IPrivacy
+from lp.app.errors import NameLookupFailed
from lp.registry.interfaces.role import IHasOwner
from lp.soyuz.interfaces.buildrecords import IHasBuildRecords
from lp.soyuz.interfaces.processor import IProcessorFamily
from lp.registry.interfaces.gpg import IGPGKey
from lp.registry.interfaces.person import IPerson
from canonical.launchpad.validators.name import name_validator
-from canonical.launchpad.webapp.interfaces import NameLookupFailed
from lazr.restful.declarations import (
REQUEST_USER, call_with, export_as_webservice_entry, exported,
=== modified file 'lib/lp/soyuz/interfaces/packageset.py'
--- lib/lp/soyuz/interfaces/packageset.py 2010-03-16 01:30:39 +0000
+++ lib/lp/soyuz/interfaces/packageset.py 2010-08-02 02:29:41 +0000
@@ -19,7 +19,6 @@
from canonical.launchpad import _
from canonical.launchpad.validators.name import name_validator
-from canonical.launchpad.webapp.interfaces import NameLookupFailed
from lazr.restful.declarations import (
collection_default_content, export_as_webservice_collection,
export_as_webservice_entry, export_factory_operation,
@@ -28,6 +27,7 @@
operation_returns_entry, webservice_error)
from lazr.restful.fields import Reference
from lazr.restful.interface import copy_field
+from lp.app.errors import NameLookupFailed
from lp.registry.interfaces.distroseries import IDistroSeries
from lp.registry.interfaces.person import IPerson
from lp.registry.interfaces.role import IHasOwner
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py 2010-07-27 12:53:24 +0000
+++ lib/lp/soyuz/model/archive.py 2010-08-02 02:29:41 +0000
@@ -22,6 +22,7 @@
from zope.event import notify
from zope.interface import alsoProvides, implements
+from lp.app.errors import NotFoundError
from lp.archivepublisher.debversion import Version
from lp.archiveuploader.utils import re_issource, re_isadeb
from canonical.config import config
@@ -84,8 +85,7 @@
from lp.soyuz.interfaces.component import IComponent, IComponentSet
from lp.registry.interfaces.distroseries import IDistroSeriesSet
from lp.registry.interfaces.person import PersonVisibility
-from canonical.launchpad.interfaces.launchpad import (
- ILaunchpadCelebrities, NotFoundError)
+from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from lp.registry.interfaces.pocket import PackagePublishingPocket
from lp.registry.interfaces.role import IHasOwner
from lp.soyuz.interfaces.queue import PackageUploadStatus
=== modified file 'lib/lp/soyuz/model/archivepermission.py'
--- lib/lp/soyuz/model/archivepermission.py 2010-03-30 13:53:25 +0000
+++ lib/lp/soyuz/model/archivepermission.py 2010-08-02 02:29:41 +0000
@@ -22,6 +22,7 @@
from canonical.database.enumcol import EnumCol
from canonical.database.sqlbase import sqlvalues, SQLBase
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.distribution import IDistributionSet
from lp.soyuz.interfaces.archive import ComponentNotFound, IArchive
from lp.soyuz.interfaces.archivepermission import (
@@ -33,7 +34,6 @@
from lp.soyuz.interfaces.packageset import IPackageset
from lp.registry.interfaces.sourcepackagename import (
ISourcePackageName, ISourcePackageNameSet)
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.webapp.interfaces import (
IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)
=== modified file 'lib/lp/soyuz/model/binarypackagebuild.py'
--- lib/lp/soyuz/model/binarypackagebuild.py 2010-07-20 19:12:33 +0000
+++ lib/lp/soyuz/model/binarypackagebuild.py 2010-08-02 02:29:41 +0000
@@ -32,8 +32,7 @@
LibraryFileAlias, LibraryFileContent)
from canonical.launchpad.helpers import (
get_contact_email_addresses, get_email_template)
-from canonical.launchpad.interfaces.launchpad import (
- NotFoundError, ILaunchpadCelebrities)
+from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.interfaces.lpstorm import IMasterObject, ISlaveStore
from canonical.launchpad.mail import (
simple_sendmail, format_address)
@@ -41,6 +40,7 @@
from canonical.launchpad.webapp.interfaces import (
IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)
from canonical.launchpad.webapp.tales import DurationFormatterAPI
+from lp.app.errors import NotFoundError
from lp.archivepublisher.utils import get_ppa_reference
from lp.buildmaster.interfaces.buildbase import BuildStatus
from lp.buildmaster.interfaces.buildfarmjob import BuildFarmJobType
=== modified file 'lib/lp/soyuz/model/binarypackagename.py'
--- lib/lp/soyuz/model/binarypackagename.py 2009-06-25 04:06:00 +0000
+++ lib/lp/soyuz/model/binarypackagename.py 2010-08-02 02:29:41 +0000
@@ -24,7 +24,7 @@
from canonical.database.sqlbase import SQLBase, sqlvalues
from canonical.launchpad.webapp.vocabulary import (
NamedSQLObjectHugeVocabulary, BatchedCountableIterator)
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.soyuz.interfaces.binarypackagename import (
IBinaryPackageName, IBinaryPackageNameSet)
from lp.soyuz.interfaces.publishing import PackagePublishingStatus
=== modified file 'lib/lp/soyuz/model/component.py'
--- lib/lp/soyuz/model/component.py 2009-06-25 04:06:00 +0000
+++ lib/lp/soyuz/model/component.py 2010-08-02 02:29:41 +0000
@@ -16,7 +16,7 @@
from canonical.database.sqlbase import SQLBase
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.soyuz.interfaces.component import (
IComponent, IComponentSelection, IComponentSet)
=== modified file 'lib/lp/soyuz/model/distroarchseriesbinarypackage.py'
--- lib/lp/soyuz/model/distroarchseriesbinarypackage.py 2009-09-03 15:17:24 +0000
+++ lib/lp/soyuz/model/distroarchseriesbinarypackage.py 2010-08-02 02:29:41 +0000
@@ -17,6 +17,7 @@
from canonical.cachedproperty import cachedproperty
from canonical.database.sqlbase import sqlvalues
from canonical.launchpad.interfaces import IStore
+from lp.app.errors import NotFoundError
from lp.soyuz.model.binarypackagerelease import (
BinaryPackageRelease)
from lp.soyuz.model.distroarchseriesbinarypackagerelease import (
@@ -25,7 +26,6 @@
DistroSeriesPackageCache)
from lp.soyuz.model.publishing import (
BinaryPackagePublishingHistory)
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.soyuz.interfaces.distroarchseriesbinarypackage import (
IDistroArchSeriesBinaryPackage)
from lp.soyuz.interfaces.publishing import PackagePublishingStatus
=== modified file 'lib/lp/soyuz/model/packageset.py'
--- lib/lp/soyuz/model/packageset.py 2010-03-16 01:30:39 +0000
+++ lib/lp/soyuz/model/packageset.py 2010-08-02 02:29:41 +0000
@@ -14,7 +14,7 @@
from zope.interface import implements
from canonical.launchpad.interfaces.lpstorm import IMasterStore, IStore
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.sourcepackagename import (
ISourcePackageName, ISourcePackageNameSet)
=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py 2010-07-23 15:34:09 +0000
+++ lib/lp/soyuz/model/publishing.py 2010-08-02 02:29:41 +0000
@@ -43,7 +43,7 @@
IStoreSelector, MAIN_STORE, DEFAULT_FLAVOR)
from canonical.launchpad.webapp.errorlog import (
ErrorReportingUtility, ScriptRequest)
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.buildmaster.interfaces.buildbase import BuildStatus
from lp.buildmaster.model.buildfarmjob import BuildFarmJob
from lp.buildmaster.model.packagebuild import PackageBuild
=== modified file 'lib/lp/soyuz/model/queue.py'
--- lib/lp/soyuz/model/queue.py 2010-07-11 19:42:41 +0000
+++ lib/lp/soyuz/model/queue.py 2010-08-02 02:29:41 +0000
@@ -26,6 +26,7 @@
from zope.component import getUtility
from zope.interface import implements
+from lp.app.errors import NotFoundError
# XXX 2009-05-10 julian
# This should not import from archivepublisher, but to avoid
# that it needs a bit of redesigning here around the publication stuff.
@@ -69,7 +70,6 @@
from canonical.librarian.interfaces import DownloadFailed
from canonical.librarian.utils import copy_and_close
from canonical.launchpad.webapp import canonical_url
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.interfaces.lpstorm import IMasterStore
=== modified file 'lib/lp/soyuz/model/section.py'
--- lib/lp/soyuz/model/section.py 2009-06-25 04:06:00 +0000
+++ lib/lp/soyuz/model/section.py 2010-08-02 02:29:41 +0000
@@ -16,9 +16,9 @@
from canonical.database.sqlbase import SQLBase
+from lp.app.errors import NotFoundError
from lp.soyuz.interfaces.section import (
ISection, ISectionSelection, ISectionSet)
-from canonical.launchpad.webapp.interfaces import NotFoundError
class Section(SQLBase):
=== modified file 'lib/lp/soyuz/model/sourcepackagerelease.py'
--- lib/lp/soyuz/model/sourcepackagerelease.py 2010-07-29 22:55:15 +0000
+++ lib/lp/soyuz/model/sourcepackagerelease.py 2010-08-02 02:29:41 +0000
@@ -34,7 +34,7 @@
LibraryFileAlias, LibraryFileContent)
from canonical.launchpad.helpers import shortlist
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.archiveuploader.utils import determine_source_file_type
from lp.buildmaster.interfaces.buildbase import BuildStatus
from lp.registry.interfaces.person import validate_public_person
=== modified file 'lib/lp/soyuz/scripts/buildd.py'
--- lib/lp/soyuz/scripts/buildd.py 2010-05-20 14:28:51 +0000
+++ lib/lp/soyuz/scripts/buildd.py 2010-08-02 02:29:41 +0000
@@ -14,7 +14,7 @@
from zope.component import getUtility
from canonical.config import config
-from canonical.launchpad.interfaces.launchpad import NotFoundError
+from lp.app.errors import NotFoundError
from lp.archivepublisher.debversion import Version
from lp.archivepublisher.utils import process_in_batches
from lp.buildmaster.interfaces.buildbase import BuildStatus
=== modified file 'lib/lp/soyuz/scripts/changeoverride.py'
--- lib/lp/soyuz/scripts/changeoverride.py 2009-06-25 04:06:00 +0000
+++ lib/lp/soyuz/scripts/changeoverride.py 2010-08-02 02:29:41 +0000
@@ -12,9 +12,9 @@
from zope.component import getUtility
+from lp.app.errors import NotFoundError
from lp.soyuz.interfaces.component import IComponentSet
from lp.soyuz.interfaces.section import ISectionSet
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.soyuz.scripts.ftpmasterbase import (
SoyuzScript, SoyuzScriptError)
=== modified file 'lib/lp/soyuz/scripts/ftpmaster.py'
--- lib/lp/soyuz/scripts/ftpmaster.py 2010-07-11 12:23:27 +0000
+++ lib/lp/soyuz/scripts/ftpmaster.py 2010-08-02 02:29:41 +0000
@@ -35,7 +35,7 @@
from canonical.launchpad.helpers import filenameToContentType
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.archiveuploader.utils import (
determine_source_file_type)
from lp.registry.interfaces.distribution import IDistributionSet
=== modified file 'lib/lp/soyuz/scripts/ftpmasterbase.py'
--- lib/lp/soyuz/scripts/ftpmasterbase.py 2009-06-25 04:06:00 +0000
+++ lib/lp/soyuz/scripts/ftpmasterbase.py 2010-08-02 02:29:41 +0000
@@ -15,10 +15,10 @@
from zope.component import getUtility
+from lp.app.errors import NotFoundError
from lp.soyuz.adapters.packagelocation import (
build_package_location)
from lp.soyuz.interfaces.component import IComponentSet
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.services.scripts.base import (
LaunchpadScript, LaunchpadScriptFailure)
=== modified file 'lib/lp/soyuz/scripts/populate_archive.py'
--- lib/lp/soyuz/scripts/populate_archive.py 2010-07-15 21:30:26 +0000
+++ lib/lp/soyuz/scripts/populate_archive.py 2010-08-02 02:29:41 +0000
@@ -13,6 +13,7 @@
from zope.component import getUtility
from zope.security.proxy import removeSecurityProxy
+from lp.app.errors import NotFoundError
from lp.soyuz.adapters.packagelocation import (
build_package_location)
from lp.soyuz.interfaces.component import IComponentSet
@@ -21,7 +22,6 @@
from lp.soyuz.scripts.ftpmasterbase import (
SoyuzScript, SoyuzScriptError)
from canonical.launchpad.validators.name import valid_name
-from canonical.launchpad.webapp.interfaces import NotFoundError
def specified(option):
=== modified file 'lib/lp/soyuz/scripts/ppa_add_missing_builds.py'
--- lib/lp/soyuz/scripts/ppa_add_missing_builds.py 2010-01-29 16:33:55 +0000
+++ lib/lp/soyuz/scripts/ppa_add_missing_builds.py 2010-08-02 02:29:41 +0000
@@ -6,7 +6,7 @@
from zope.component import getUtility
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.services.scripts.base import LaunchpadScript
from lp.soyuz.interfaces.publishing import PackagePublishingStatus
=== modified file 'lib/lp/soyuz/scripts/processaccepted.py'
--- lib/lp/soyuz/scripts/processaccepted.py 2010-04-13 11:50:42 +0000
+++ lib/lp/soyuz/scripts/processaccepted.py 2010-08-02 02:29:41 +0000
@@ -15,13 +15,13 @@
from zope.component import getUtility
+from lp.app.errors import NotFoundError
from lp.archiveuploader.tagfiles import parse_tagfile_lines
from lp.bugs.interfaces.bug import IBugSet
from lp.bugs.interfaces.bugtask import BugTaskStatus
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.webapp.errorlog import (
ErrorReportingUtility, ScriptRequest)
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.soyuz.interfaces.archive import ArchivePurpose, IArchiveSet
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.pocket import PackagePublishingPocket
=== modified file 'lib/lp/soyuz/scripts/publishdistro.py'
--- lib/lp/soyuz/scripts/publishdistro.py 2010-07-13 16:09:51 +0000
+++ lib/lp/soyuz/scripts/publishdistro.py 2010-08-02 02:29:41 +0000
@@ -12,6 +12,7 @@
from zope.component import getUtility
+from lp.app.errors import NotFoundError
from lp.archivepublisher.publishing import getPublisher
from canonical.database.sqlbase import (
clear_current_connection_cache, flush_database_updates)
@@ -20,7 +21,6 @@
from lp.registry.interfaces.distribution import IDistributionSet
from canonical.launchpad.scripts import logger, logger_options
from lp.services.scripts.base import LaunchpadScriptFailure
-from canonical.launchpad.webapp.interfaces import NotFoundError
# XXX Julian 2008-02-07 bug=189866:
# These functions should be in a LaunchpadScript.
=== modified file 'lib/lp/soyuz/scripts/queue.py'
--- lib/lp/soyuz/scripts/queue.py 2010-05-14 04:56:47 +0000
+++ lib/lp/soyuz/scripts/queue.py 2010-08-02 02:29:41 +0000
@@ -25,9 +25,9 @@
from zope.component import getUtility
+from lp.app.errors import NotFoundError
from lp.soyuz.interfaces.component import IComponentSet
from lp.soyuz.interfaces.section import ISectionSet
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.soyuz.interfaces.queue import (
IPackageUploadSet, PackageUploadStatus, QueueInconsistentStateError)
from canonical.cachedproperty import cachedproperty
=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py 2010-07-23 10:58:48 +0000
+++ lib/lp/soyuz/tests/test_publishing.py 2010-08-02 02:29:41 +0000
@@ -18,9 +18,9 @@
from canonical.database.constants import UTC_NOW
from canonical.launchpad.interfaces.librarian import ILibraryFileAliasSet
from canonical.launchpad.webapp.errorlog import ErrorReportingUtility
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.testing import (
DatabaseFunctionalLayer, LaunchpadZopelessLayer)
+from lp.app.errors import NotFoundError
from lp.archivepublisher.config import Config
from lp.archivepublisher.diskpool import DiskPool
from lp.buildmaster.interfaces.buildbase import BuildStatus
=== modified file 'lib/lp/testopenid/browser/server.py'
--- lib/lp/testopenid/browser/server.py 2010-07-21 13:32:53 +0000
+++ lib/lp/testopenid/browser/server.py 2010-08-02 02:29:41 +0000
@@ -32,11 +32,12 @@
from canonical.launchpad.webapp import (
action, LaunchpadFormView, LaunchpadView)
from canonical.launchpad.webapp.interfaces import (
- ICanonicalUrlData, IPlacelessLoginSource, UnexpectedFormData)
+ ICanonicalUrlData, IPlacelessLoginSource)
from canonical.launchpad.webapp.login import (
allowUnauthenticatedSession, logInPrincipal, logoutPerson)
from canonical.launchpad.webapp.publisher import Navigation, stepthrough
+from lp.app.errors import UnexpectedFormData
from lp.services.openid.browser.openiddiscovery import (
XRDSContentNegotiationMixin)
from lp.testopenid.interfaces.server import (
=== modified file 'lib/lp/translations/browser/customlanguagecode.py'
--- lib/lp/translations/browser/customlanguagecode.py 2009-11-13 16:18:54 +0000
+++ lib/lp/translations/browser/customlanguagecode.py 2010-08-02 02:29:41 +0000
@@ -18,6 +18,7 @@
from canonical.lazr.utils import smartquote
+from lp.app.errors import NotFoundError
from lp.translations.interfaces.customlanguagecode import (
ICustomLanguageCode, IHasCustomLanguageCodes)
@@ -25,7 +26,6 @@
action, canonical_url, LaunchpadFormView, LaunchpadView, Navigation,
stepthrough)
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.webapp.menu import structured
=== modified file 'lib/lp/translations/browser/distroseries.py'
--- lib/lp/translations/browser/distroseries.py 2010-04-27 22:22:20 +0000
+++ lib/lp/translations/browser/distroseries.py 2010-08-02 02:29:41 +0000
@@ -20,13 +20,13 @@
from canonical.launchpad import helpers
from canonical.launchpad.webapp import action
from canonical.launchpad.webapp.authorization import check_permission
-from canonical.launchpad.webapp.interfaces import TranslationUnavailable
from canonical.launchpad.webapp.launchpadform import LaunchpadEditFormView
from canonical.launchpad.webapp.menu import (
Link, NavigationMenu, enabled_with_permission)
from canonical.launchpad.webapp.publisher import (
canonical_url, LaunchpadView)
+from lp.app.errors import TranslationUnavailable
from lp.registry.interfaces.distroseries import IDistroSeries
from lp.registry.interfaces.series import SeriesStatus
from lp.translations.browser.translations import TranslationsMixin
=== modified file 'lib/lp/translations/browser/hastranslationimports.py'
--- lib/lp/translations/browser/hastranslationimports.py 2009-11-20 14:15:34 +0000
+++ lib/lp/translations/browser/hastranslationimports.py 2010-08-02 02:29:41 +0000
@@ -24,7 +24,7 @@
from canonical.cachedproperty import cachedproperty
from canonical.launchpad import _
-from canonical.launchpad.webapp.interfaces import UnexpectedFormData
+from lp.app.errors import UnexpectedFormData
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.pillar import IPillarNameSet
from lp.translations.interfaces.translationimportqueue import (
=== modified file 'lib/lp/translations/browser/pofile.py'
--- lib/lp/translations/browser/pofile.py 2010-06-17 08:28:33 +0000
+++ lib/lp/translations/browser/pofile.py 2010-08-02 02:29:41 +0000
@@ -28,13 +28,11 @@
from canonical.cachedproperty import cachedproperty
from canonical.config import config
+from lp.app.errors import NotFoundError, UnexpectedFormData
from lp.translations.browser.translationmessage import (
BaseTranslationView, CurrentTranslationMessageView)
from lp.translations.browser.poexportrequest import BaseExportView
from lp.translations.browser.potemplate import POTemplateFacets
-from canonical.launchpad.webapp.interfaces import (
- NotFoundError,
- UnexpectedFormData)
from lp.registry.interfaces.person import IPersonSet
from lp.translations.interfaces.pofile import IPOFile
from lp.translations.interfaces.translationimporter import (
=== modified file 'lib/lp/translations/browser/potemplate.py'
--- lib/lp/translations/browser/potemplate.py 2010-07-22 14:59:48 +0000
+++ lib/lp/translations/browser/potemplate.py 2010-08-02 02:29:41 +0000
@@ -39,7 +39,8 @@
from canonical.launchpad import helpers, _
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
-from canonical.launchpad.webapp.interfaces import ILaunchBag, NotFoundError
+from canonical.launchpad.webapp.interfaces import ILaunchBag
+from lp.app.errors import NotFoundError
from lp.translations.browser.poexportrequest import BaseExportView
from lp.registry.browser.productseries import ProductSeriesFacets
from lp.translations.browser.translations import TranslationsMixin
=== modified file 'lib/lp/translations/browser/tests/test_pofile_view.py'
--- lib/lp/translations/browser/tests/test_pofile_view.py 2010-06-17 08:40:06 +0000
+++ lib/lp/translations/browser/tests/test_pofile_view.py 2010-08-02 02:29:41 +0000
@@ -7,9 +7,9 @@
import pytz
from unittest import TestLoader
-from canonical.launchpad.interfaces.launchpad import UnexpectedFormData
from canonical.launchpad.webapp.servers import LaunchpadTestRequest
from canonical.testing import LaunchpadZopelessLayer
+from lp.app.errors import UnexpectedFormData
from lp.testing import TestCaseWithFactory
from lp.translations.browser.pofile import POFileBaseView, POFileTranslateView
=== modified file 'lib/lp/translations/browser/translationgroup.py'
--- lib/lp/translations/browser/translationgroup.py 2010-03-03 19:32:16 +0000
+++ lib/lp/translations/browser/translationgroup.py 2010-08-02 02:29:41 +0000
@@ -18,13 +18,13 @@
from zope.component import getUtility
+from lp.app.errors import NotFoundError
from lp.translations.interfaces.translationgroup import (
ITranslationGroup, ITranslationGroupSet)
from lp.translations.interfaces.translator import (
ITranslator, ITranslatorSet)
from lp.registry.browser.objectreassignment import (
ObjectReassignmentView)
-from canonical.launchpad.webapp.interfaces import NotFoundError
from canonical.launchpad.webapp import (
action, canonical_url, GetitemNavigation, LaunchpadEditFormView,
LaunchpadFormView, LaunchpadView)
=== modified file 'lib/lp/translations/browser/translationimportqueue.py'
--- lib/lp/translations/browser/translationimportqueue.py 2010-07-28 10:02:08 +0000
+++ lib/lp/translations/browser/translationimportqueue.py 2010-08-02 02:29:41 +0000
@@ -23,8 +23,7 @@
from canonical.database.constants import UTC_NOW
from canonical.launchpad.webapp.tales import DateTimeFormatterAPI
-from canonical.launchpad.webapp.interfaces import (
- NotFoundError, UnexpectedFormData)
+from lp.app.errors import NotFoundError, UnexpectedFormData
from lp.translations.browser.hastranslationimports import (
HasTranslationImportsView)
from lp.registry.interfaces.distroseries import IDistroSeries
=== modified file 'lib/lp/translations/interfaces/potemplate.py'
--- lib/lp/translations/interfaces/potemplate.py 2010-07-23 11:35:07 +0000
+++ lib/lp/translations/interfaces/potemplate.py 2010-08-02 02:29:41 +0000
@@ -13,8 +13,8 @@
operation_returns_collection_of)
from canonical.launchpad.fields import ParticipatingPersonChoice
-from canonical.launchpad.interfaces.launchpad import NotFoundError
from canonical.launchpad.interfaces.librarian import ILibraryFileAlias
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.distribution import IDistribution
from lp.translations.interfaces.rosettastats import IRosettaStats
from lp.registry.interfaces.sourcepackagename import (
=== modified file 'lib/lp/translations/model/potemplate.py'
--- lib/lp/translations/model/potemplate.py 2010-07-26 12:58:13 +0000
+++ lib/lp/translations/model/potemplate.py 2010-08-02 02:29:41 +0000
@@ -40,6 +40,7 @@
SQLBase, quote, quote_like, flush_database_updates, sqlvalues)
from canonical.launchpad import helpers
from canonical.launchpad.interfaces.lpstorm import IStore
+from lp.app.errors import NotFoundError
from lp.translations.utilities.rosettastats import RosettaStats
from lp.services.database.prejoin import prejoin
from lp.services.database.collection import Collection
@@ -55,7 +56,6 @@
TranslationTemplateItem)
from lp.translations.model.vpotexport import VPOTExport
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
-from canonical.launchpad.webapp.interfaces import NotFoundError
from lp.translations.interfaces.pofile import IPOFileSet
from lp.translations.interfaces.potemplate import (
IHasTranslationTemplates,
=== modified file 'lib/lp/translations/model/potmsgset.py'
--- lib/lp/translations/model/potmsgset.py 2010-06-28 09:59:42 +0000
+++ lib/lp/translations/model/potmsgset.py 2010-08-02 02:29:41 +0000
@@ -27,8 +27,8 @@
make_plurals_sql_fragment)
from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
from canonical.launchpad.readonly import is_read_only
-from canonical.launchpad.webapp.interfaces import UnexpectedFormData
from canonical.launchpad.interfaces.lpstorm import ISlaveStore
+from lp.app.errors import UnexpectedFormData
from lp.translations.interfaces.pofile import IPOFileSet
from lp.translations.interfaces.potmsgset import (
BrokenTextError,
=== modified file 'lib/lp/translations/model/translationgroup.py'
--- lib/lp/translations/model/translationgroup.py 2010-04-22 11:23:28 +0000
+++ lib/lp/translations/model/translationgroup.py 2010-08-02 02:29:41 +0000
@@ -19,6 +19,7 @@
from storm.expr import Join
from storm.store import Store
+from lp.app.errors import NotFoundError
from lp.translations.interfaces.translationgroup import (
ITranslationGroup, ITranslationGroupSet)
from lp.registry.model.person import Person
@@ -28,7 +29,7 @@
from lp.services.worlddata.model.language import Language
from lp.translations.model.translator import Translator
from canonical.launchpad.webapp.interfaces import (
- DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE, NotFoundError)
+ DEFAULT_FLAVOR, IStoreSelector, MAIN_STORE)
from canonical.database.sqlbase import SQLBase
from canonical.database.constants import DEFAULT
=== modified file 'lib/lp/translations/model/translationimportqueue.py'
--- lib/lp/translations/model/translationimportqueue.py 2010-07-23 14:50:50 +0000
+++ lib/lp/translations/model/translationimportqueue.py 2010-08-02 02:29:41 +0000
@@ -35,7 +35,7 @@
from canonical.launchpad.interfaces.launchpad import (
ILaunchpadCelebrities, IPersonRoles)
from canonical.launchpad.interfaces.lpstorm import IMasterStore, ISlaveStore
-from canonical.launchpad.webapp.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from lp.registry.interfaces.distribution import IDistribution
from lp.registry.interfaces.series import SeriesStatus
from lp.registry.interfaces.distroseries import IDistroSeries
=== modified file 'scripts/ftpmaster-tools/archive-override-check.py'
--- scripts/ftpmaster-tools/archive-override-check.py 2010-04-27 19:48:39 +0000
+++ scripts/ftpmaster-tools/archive-override-check.py 2010-08-02 02:29:41 +0000
@@ -19,7 +19,7 @@
from canonical.config import config
from canonical.launchpad.scripts import (
execute_zcml_for_scripts, logger, logger_options)
-from canonical.launchpad.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from canonical.lp import initZopeless
from lp.registry.interfaces.distribution import IDistributionSet
from lp.registry.interfaces.pocket import PackagePublishingPocket
=== modified file 'scripts/ftpmaster-tools/buildd-mass-retry.py'
--- scripts/ftpmaster-tools/buildd-mass-retry.py 2010-05-03 14:04:58 +0000
+++ scripts/ftpmaster-tools/buildd-mass-retry.py 2010-08-02 02:29:41 +0000
@@ -19,7 +19,7 @@
from zope.component import getUtility
from canonical.database.sqlbase import ISOLATION_LEVEL_READ_COMMITTED
-from canonical.launchpad.interfaces import NotFoundError
+from lp.app.errors import NotFoundError
from canonical.launchpad.scripts import (
execute_zcml_for_scripts, logger_options, logger)
from canonical.lp import initZopeless
=== modified file 'scripts/ftpmaster-tools/initialise-from-parent.py'
--- scripts/ftpmaster-tools/initialise-from-parent.py 2010-04-27 19:48:39 +0000
+++ scripts/ftpmaster-tools/initialise-from-parent.py 2010-08-02 02:29:41 +0000
@@ -25,10 +25,11 @@
from canonical.config import config
from canonical.database.sqlbase import (
sqlvalues, flush_database_updates, cursor, flush_database_caches)
-from canonical.launchpad.interfaces import IDistributionSet, NotFoundError
+from canonical.launchpad.interfaces import IDistributionSet
from canonical.launchpad.scripts import (
execute_zcml_for_scripts, logger, logger_options)
from canonical.lp import initZopeless
+from lp.app.errors import NotFoundError
from lp.soyuz.interfaces.queue import PackageUploadStatus
=== modified file 'scripts/migrate-bugzilla-initialcontacts.py'
--- scripts/migrate-bugzilla-initialcontacts.py 2010-04-27 19:48:39 +0000
+++ scripts/migrate-bugzilla-initialcontacts.py 2010-08-02 02:29:41 +0000
@@ -14,7 +14,9 @@
from canonical.lp import initZopeless
from canonical.launchpad.scripts import execute_zcml_for_scripts
from canonical.launchpad.interfaces import (
- IPersonSet, IEmailAddressSet, ILaunchpadCelebrities, NotFoundError)
+ IPersonSet, IEmailAddressSet, ILaunchpadCelebrities)
+from lp.app.errors import NotFoundError
+
execute_zcml_for_scripts()
ztm = initZopeless()