changeset 574:bc23465ed1b4

bug: Fix a crash when some errors occur during page rendering.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 19 Dec 2015 18:05:28 -0800
parents a489162f2a17
children 657384f08ca3
files piecrust/rendering.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/rendering.py	Sat Dec 19 18:02:58 2015 -0800
+++ b/piecrust/rendering.py	Sat Dec 19 18:05:28 2015 -0800
@@ -279,7 +279,7 @@
                 layout_result['pass_info'])
         return rp
     except Exception as ex:
-        page_rel_path = os.path.relpath(page.path, ctx.app.root_dir)
+        page_rel_path = os.path.relpath(ctx.page.path, ctx.app.root_dir)
         raise Exception("Error rendering page: %s" % page_rel_path) from ex
     finally:
         ctx.setCurrentPass(PASS_NONE)