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
This commit is contained in:
Tony Breeds 2018-08-29 16:21:34 +10:00
parent c36fe29624
commit 32db09bc0f
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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