Mercurial > cgi-bin > hgweb.cgi > tincan
diff tincan.py @ 26:cc6ba7834294 draft header-includes
Some minor bug fixes, but boy, does Chameleon stink.
author | David Barts <n5jrn@me.com> |
---|---|
date | Sun, 26 May 2019 13:14:26 -0700 |
parents | e93e5e746cc5 |
children | 2e3ac3d7b0a4 |
line wrap: on
line diff
--- a/tincan.py Sun May 26 11:43:48 2019 -0700 +++ b/tincan.py Sun May 26 13:14:26 2019 -0700 @@ -533,13 +533,13 @@ self._body = self._tclass(source=rendered) self._body.prepare() except Exception as e: - raise TinCanError("{0}: template error: {1!s}".format(urlpath, e)) from e + raise TinCanError("{0}: template error: {1!s}".format(self._urlpath, e)) from e return rendered def _dumpbody(self, rendered, based_on, logname): if self._save_includes: try: - with open(based_on + 'i', w) as fp: + with open(based_on + "i", "w") as fp: fp.write(rendered) except OSError as e: raise TinCanError("{0}: {1!s}".format(logname, e)) from e