[Zope3-checkins] SVN: Zope3/trunk/src/bugtracker/ getTerm is
specified to return LookupError.
Jim Fulton
jim at zope.com
Tue Oct 26 19:07:50 EDT 2004
Log message for revision 28266:
getTerm is specified to return LookupError.
Changed:
U Zope3/trunk/src/bugtracker/browser/bug.py
U Zope3/trunk/src/bugtracker/browser/comment.py
U Zope3/trunk/src/bugtracker/exportimport.py
-=-
Modified: Zope3/trunk/src/bugtracker/browser/bug.py
===================================================================
--- Zope3/trunk/src/bugtracker/browser/bug.py 2004-10-26 22:59:37 UTC (rev 28265)
+++ Zope3/trunk/src/bugtracker/browser/bug.py 2004-10-26 23:07:50 UTC (rev 28266)
@@ -19,7 +19,6 @@
import re
from zope.component.interfaces import IViewFactory
-from zope.exceptions import NotFoundError
from zope.security.interfaces import Unauthorized, ForbiddenAttribute
from zope.interface import implements
from zope.proxy import removeAllProxies
@@ -64,7 +63,7 @@
id = self.context.submitter
try:
return users.getTerm(id).principal
- except NotFoundError:
+ except LookupError:
# There is no principal for this id, so let's just fake one.
return {'id': id, 'login': id, 'title': id, 'description': id}
@@ -120,7 +119,7 @@
for id in self.context.owners:
try:
userTerms.append(vocab.getTerm(id).principal)
- except NotFoundError:
+ except LookupError:
# There is no principal for this id, so let's just fake one.
userTerms.append(
{'id': id, 'login': id, 'title': id, 'description': id})
Modified: Zope3/trunk/src/bugtracker/browser/comment.py
===================================================================
--- Zope3/trunk/src/bugtracker/browser/comment.py 2004-10-26 22:59:37 UTC (rev 28265)
+++ Zope3/trunk/src/bugtracker/browser/comment.py 2004-10-26 23:07:50 UTC (rev 28266)
@@ -39,7 +39,7 @@
id = dc.creators[0]
try:
return users.getTerm(id).principal
- except NotFoundError:
+ except LookupError:
# There is no principal for this id, so let's just fake one.
return {'id': id, 'login': id, 'title': id, 'description': id}
Modified: Zope3/trunk/src/bugtracker/exportimport.py
===================================================================
--- Zope3/trunk/src/bugtracker/exportimport.py 2004-10-26 22:59:37 UTC (rev 28265)
+++ Zope3/trunk/src/bugtracker/exportimport.py 2004-10-26 23:07:50 UTC (rev 28266)
@@ -21,7 +21,6 @@
from xml.sax import parse
from xml.sax.handler import ContentHandler
-from zope.exceptions import NotFoundError
from zope.i18n.locales import locales
from zope.publisher.browser import TestRequest
from zope.schema.vocabulary import getVocabularyRegistry
@@ -116,7 +115,7 @@
vocab = registry.get(self.context, 'Users')
try:
return vocab.getTerm(self.context.submitter).principal['login']
- except NotFoundError:
+ except LookupError:
return self.context.submitter
def created(self):
@@ -151,7 +150,7 @@
for owner in self.context.owners:
try:
owners.append(vocab.getTerm(owner).principal['login'])
- except NotFoundError:
+ except LookupError:
owners.append(owner)
return ', '.join(owners)
More information about the Zope3-Checkins
mailing list