Allow mako-render script to take relative path filenames
Derek Harland
Branch: Deleted repository:patch-fix-mako-render-relative-path
Branch: zzzeek/mako:master
Merged
Merged pull request
Merged in dharland/mako/patch-fix-mako-render-relative-path (pull request #2)
Currently, using mako-render as follows
$ mako-render ../my-template.mako
will cause an exception
mako.exceptions.TemplateLookupException: Template uri "../my-template.mako" is invalid - it cannot be relative outside of the root path.
This is because
mako-render
passes both the template source and the template filename toTemplate
(according to the documentation they are mutually exclusive). Thus theTemplate
will never need to try and load the template itself, but will still complain about the path name.This patch defers the path-name check until if and when it is actually needed.