[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/README.txt Corrected exception import.

Malthe Borch mborch at gmail.com
Tue Mar 3 04:13:08 EST 2009


Log message for revision 97433:
  Corrected exception import.

Changed:
  U   z3c.pt/trunk/src/z3c/pt/README.txt

-=-
Modified: z3c.pt/trunk/src/z3c/pt/README.txt
===================================================================
--- z3c.pt/trunk/src/z3c/pt/README.txt	2009-03-03 09:10:24 UTC (rev 97432)
+++ z3c.pt/trunk/src/z3c/pt/README.txt	2009-03-03 09:13:07 UTC (rev 97433)
@@ -331,6 +331,8 @@
 Namespace Adapter doesn't have a callable function but traverses the
 remaining path instead::
 
+  >>> from zope.traversing.interfaces import TraversalError
+  
   >>> class ns4(object):
   ...     zope.interface.implements(ITraversable)
   ...     def __init__(self, context):
@@ -342,7 +344,7 @@
   ...		  elif not furtherPath:
   ...                 pagetype = 'default'
   ...             else:
-  ...                 raise ValueError("Max 1 path segment after ns4:page")
+  ...                 raise TraversalError("Max 1 path segment after ns4:page")
   ...             return self.page(pagetype)
   ...         if len(furtherPath) == 1:
   ...              name = '%s/%s' % (name, furtherPath.pop())



More information about the Checkins mailing list