diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-04-18 10:16:33 +1200 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-05-04 23:57:53 +1200 |
commit | 0b6dac83b56450c74ab1f613ca7d0713b80c10ab (patch) | |
tree | f7a6a688aefedbf4650c166b241e18f6335fad46 /rrs/tools/rrs_upstream_email.py | |
parent | 227b9c65af14ab7edfa788b3b33b141a21df78c3 (diff) | |
download | openembedded-core-contrib-0b6dac83b56450c74ab1f613ca7d0713b80c10ab.tar.gz |
rrs_upstream_email: Adapt to template rendering API change
With Django 1.10+, if you use get_template() to retrieve a template,
then you can't pass a context when calling .render() on it, you need to
pass a dict instead.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'rrs/tools/rrs_upstream_email.py')
-rwxr-xr-x | rrs/tools/rrs_upstream_email.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rrs/tools/rrs_upstream_email.py b/rrs/tools/rrs_upstream_email.py index 411cf50dda..81f5183697 100755 --- a/rrs/tools/rrs_upstream_email.py +++ b/rrs/tools/rrs_upstream_email.py @@ -104,7 +104,7 @@ def send_email(maintplan, recipes, options): plaintext = get_template('rrs/report_email.txt') site_url = 'http://' + current_site.domain + reverse('rrs_frontpage') - d = Context({ + d = { 'maintplan': maintplan, 'site': current_site, 'site_url': site_url, @@ -112,7 +112,7 @@ def send_email(maintplan, recipes, options): 'total_upgradable_count': upgradable_count, 'commits': commits, 'recipelines': recipelines, - }) + } text_content = plaintext.render(d) msg = EmailMessage(subject_content, text_content, from_email, to_email_list) |