Mercurial > piecrust2
comparison piecrust/page.py @ 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 | e01473c3ea7e |
children | 2e5c5d33d62c |
comparison
equal
deleted
inserted
replaced
994:b62fb31009d7 | 995:601f4a236ee5 |
---|---|
108 page_time = _parse_config_time(self.config.get('time')) | 108 page_time = _parse_config_time(self.config.get('time')) |
109 if page_time is not None: | 109 if page_time is not None: |
110 self._datetime += page_time | 110 self._datetime += page_time |
111 else: | 111 else: |
112 # No idea what the date/time for this page is. | 112 # No idea what the date/time for this page is. |
113 self._datetime = datetime.datetime.fromtimestamp(0) | 113 self._datetime = datetime.datetime.fromtimestamp( |
114 self.path_mtime) | |
114 except Exception as ex: | 115 except Exception as ex: |
115 logger.exception(ex) | 116 logger.exception(ex) |
116 raise Exception( | 117 raise Exception( |
117 "Error computing time for page: %s" % | 118 "Error computing time for page: %s" % |
118 self.path) from ex | 119 self.path) from ex |