Steven Kryskalla  committed 938c662

fix import and semantics in example app5

  • Participants
  • Parent commits 6331685

Comments (0)

Files changed (1)

File examples/component/

 from werkzeug.serving import run_simple
 from werkzeug.wrappers import Request
+from werkzeug.exceptions import NotFound
 from genshi.template import MarkupTemplate
 from pegboard import PegboardApplication
         """Insert the next component in the hierarchy based on PATH_INFO.
         Raise NotFound in case of failure to resolve route."""
-        route = self.route(self.consume_path_element())
+        name = self.consume_path_element()
+        route = self.route(name)
         if not route:
-            raise NotFound('Route %s not found [%s/%s]' %
-                   (name, self.environ['SCRIPT_NAME'], 
+            return NotFound('Route %s not found [%s/%s]' %
+                   (name, self.environ['SCRIPT_NAME'],
  = route('page')