diff piecrust/serving/util.py @ 854:08e02c2a2a1a

core: Keep refactoring, this time to prepare for generator sources. - Make a few APIs simpler. - Content pipelines create their own jobs, so that generator sources can keep aborting in `getContents`, but rely on their pipeline to generate pages for baking.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 04 Jun 2017 23:34:28 -0700
parents f070a4fc033c
children fddaf43424e2
line wrap: on
line diff
--- a/piecrust/serving/util.py	Sun May 21 00:06:59 2017 -0700
+++ b/piecrust/serving/util.py	Sun Jun 04 23:34:28 2017 -0700
@@ -63,8 +63,7 @@
         if route_sub_num > 1:
             cur_req_path = req_path_no_num
 
-        page = _get_requested_page_for_route(app, route, route_params,
-                                             route_sub_num)
+        page = _get_requested_page_for_route(app, route, route_params)
         if page is not None:
             req_page.page = page
             req_page.sub_num = route_sub_num
@@ -82,7 +81,7 @@
     source = app.getSource(route.source_name)
     item = source.findContent(route_params)
     if item is not None:
-        return app.getPage(item)
+        return app.getPage(source, item)
     return None