changeset 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
files tincan.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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