From 32db09bc0ff8aa111e9ab2a506ab219f6972640b Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Wed, 29 Aug 2018 16:21:34 +1000 Subject: [PATCH] Update template_emails to be a functional tool At this point 'functional' just means compiles and runs without doing anything. We'll update it to have a UI as we update the various emails Change-Id: I812f5737cb81d657f2b299122bd2337130213590 --- openstack_election/cmds/template_emails.py | 13 +++++++++---- setup.cfg | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/openstack_election/cmds/template_emails.py b/openstack_election/cmds/template_emails.py index ec79850d..c97bcea2 100644 --- a/openstack_election/cmds/template_emails.py +++ b/openstack_election/cmds/template_emails.py @@ -1,12 +1,12 @@ from __future__ import print_function from __future__ import unicode_literals -from openstack_elections import config -from openstack_elections import utils +from openstack_election import config +from openstack_election import utils -conf = config.load_config() +conf = config.load_conf() -REFERENCE_URL = '%s?id=%s' (utils.PROJECTS_URL, conf['tag']) +REFERENCE_URL = '%s?id=%s' % (utils.PROJECTS_URL, conf['tag']) LEADERLESS_URL = ('http://governance.openstack.org/resolutions/' '20141128-elections-process-for-leaderless-programs.html') @@ -424,3 +424,8 @@ Thank you, [2] http://governance.openstack.org/election/#election-officials""" print(email_text % (poll_end, poll_name, future_release, REFERENCE_URL)) + + +def main(): + # FIXME(tonyb): add a command line interface + return 0 diff --git a/setup.cfg b/setup.cfg index 04fe944e..4ce3f548 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,6 +32,7 @@ console_scripts = create-directories = openstack_election.cmds.create_directories:main generate-rolls = openstack_election.cmds.generate_rolls:main owners = openstack_election.cmds.change_owners:main + template-emails = openstack_election.cmds.template_emails:main [build_sphinx] all_files = 1