Code review comment for lp:~harlowja/cloud-init/changeable-templates

Revision history for this message
Scott Moser (smoser) wrote :

Josh,
  Thank you.
  This looks great.
  The only thing I'd like to suggest is that we dont stack trace on failed import of jinja or cheetah, but rather fail to render loudly (possibly even with stack trace) if that engine is necessary.

  Ie, your code makes it so we only need cheetah if there are templates without the header and we fall back to that engine. No reason to stack trace then, as the default case we wont need them.

  Also, bonus points for a "no cheetah dependency cheetah rendering engine". Ie, if 'mport cheetah' fails, then we can log that as a warning, and try a builtin crappy renderer that does:
    for k, v in params:
       content.replace('$' + k, v)

« Back to merge proposal