charmhelpers/core/templating.py only imports python-jinja2, useless when using python3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Charm Helpers |
Fix Released
|
Undecided
|
Francis Ginther |
Bug Description
This code in charmhelpers/
def render(source, target, context, owner='root', group='root',
"""..."""
try:
from jinja2 import FileSystemLoader, Environment, exceptions
except ImportError:
try:
from charmhelpers.fetch import apt_install
except ImportError:
raise
from jinja2 import FileSystemLoader, Environment, exceptions
However, when run as part of a python3 hook, it needs to import 'python3-jinja2' instead.
Related branches
- Stuart Bishop (community): Approve
-
Diff: 35 lines (+8/-3)1 file modifiedcharmhelpers/core/templating.py (+8/-3)
tags: | removed: kanban-cross-team |
Changed in charm-helpers: | |
assignee: | nobody → Francis Ginther (fginther) |
status: | New → Fix Released |