From bc06522374d43ff056893d05bbf5b776b8b16b28 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 9 Jan 2018 21:25:32 +0000 Subject: [PATCH] Use local owners module Instead of pulling owners.py from the system-config repo, start using the local copy provided by the openstack_election package. Change-Id: I180ef0e5ec880b46f0427c1c952b640a780b5732 --- openstack_election/cmds/generate_rolls.py | 11 +---------- tox.ini | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/openstack_election/cmds/generate_rolls.py b/openstack_election/cmds/generate_rolls.py index 4fe63555..62a3056b 100755 --- a/openstack_election/cmds/generate_rolls.py +++ b/openstack_election/cmds/generate_rolls.py @@ -25,11 +25,9 @@ import time from six.moves.urllib.request import urlopen +from openstack_election import owners from openstack_election import utils -OWNERS_URL = ('%s/openstack-infra/system-config/plain/tools/owners.py' % - (utils.CGIT_URL)) - # Exclude the system / bot accounts # OpenStack Release Bot: # curl https://review.openstack.org/accounts/22816 @@ -72,13 +70,6 @@ def main(): os.makedirs(args.rolls_dir, 0o700) os.chdir(os.path.dirname(args.rolls_dir)) - if not args.cached_owners_script: - print("Grabbing script from: %s" % OWNERS_URL) - with open("owners.py", "wb") as owner_file: - owner_file.write(urlopen(OWNERS_URL).read()) - - sys.path.append(os.getcwd()) - import owners print("Starting roll generation @%s" % time.ctime()) owners.main(["owners.py", "-a", args.after, "-b", args.before, "-o", args.tag, "-r", args.tag] + MINUS_BOT_ACCOUNTS) diff --git a/tox.ini b/tox.ini index 0ddf9913..149ed7c9 100644 --- a/tox.ini +++ b/tox.ini @@ -33,4 +33,4 @@ commands = {posargs} commands = python setup.py build_sphinx [flake8] -exclude=.tox,doc/source/conf.py,rolls/owners.py +exclude=.tox,doc/source/conf.py