[Zope3-checkins]
SVN: Zope3/trunk/src/optionstorage/browser/__init__.py
Deprecation of NotFoundError
Julien Anguenot
ja at nuxeo.com
Fri Jul 29 17:14:21 EDT 2005
Log message for revision 37570:
Deprecation of NotFoundError
Changed:
U Zope3/trunk/src/optionstorage/browser/__init__.py
-=-
Modified: Zope3/trunk/src/optionstorage/browser/__init__.py
===================================================================
--- Zope3/trunk/src/optionstorage/browser/__init__.py 2005-07-29 21:10:06 UTC (rev 37569)
+++ Zope3/trunk/src/optionstorage/browser/__init__.py 2005-07-29 21:14:20 UTC (rev 37570)
@@ -1,7 +1,13 @@
+import zope.deprecation
+
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
from optionstorage.interfaces import IOptionStorage
from optionstorage import OptionDict
+
+# BBB: Can be removed in 3.3
+zope.deprecation.__show__.off()
from zope.exceptions import NotFoundError
+zope.deprecation.__show__.on()
def checkFields(request, *fields):
for field in fields:
@@ -9,6 +15,10 @@
return False
return True
+class StorageNameNotFoundError(NotFoundError):
+ # BBB: Can be Remove in 3.3
+ pass
+
class OptionStorageView(object):
storagetemplate = ViewPageTemplateFile("optionstorage.pt")
@@ -42,7 +52,7 @@
self.topic = topic
break
else:
- raise NotFoundError(self.context, name, self.request)
+ raise StorageNameNotFoundError(self.context, name, self.request)
form = self.request.form
if "SAVE" not in form:
More information about the Zope3-Checkins
mailing list