changeset 995:601f4a236ee5

bug: Fix crash on Python 3.6.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 12 May 2017 09:26:06 -0700
parents b62fb31009d7
children 92a98c84a925
files piecrust/page.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/page.py	Fri May 12 09:02:16 2017 -0700
+++ b/piecrust/page.py	Fri May 12 09:26:06 2017 -0700
@@ -110,7 +110,8 @@
                         self._datetime += page_time
                 else:
                     # No idea what the date/time for this page is.
-                    self._datetime = datetime.datetime.fromtimestamp(0)
+                    self._datetime = datetime.datetime.fromtimestamp(
+                        self.path_mtime)
             except Exception as ex:
                 logger.exception(ex)
                 raise Exception(