diff --git a/openstack_election/cmds/generate_rolls.py b/openstack_election/cmds/generate_rolls.py index 39cd2ffd..ee93b2ae 100755 --- a/openstack_election/cmds/generate_rolls.py +++ b/openstack_election/cmds/generate_rolls.py @@ -23,7 +23,7 @@ from openstack_election import utils def change_owners_options_proxy(after, before, ref, outdir='./', sieve=None, - no_extra_atcs=False): + no_extra_acs=False): options = argparse.Namespace() options.config = None @@ -34,7 +34,7 @@ def change_owners_options_proxy(after, before, ref, outdir='./', sieve=None, options.outdir = outdir options.ref = ref - options.no_extra_atcs = no_extra_atcs + options.no_extra_acs = no_extra_acs options.sieve = sieve options.legacy = None options.projects = None @@ -91,7 +91,7 @@ def main(): # owners.main() potentially mutates options so create a fresh one options = change_owners_options_proxy(args.after, args.before, args.tag, tmp_dir, - no_extra_atcs=True, + no_extra_acs=True, sieve="branch:^stable/.*") owners.main(options) print("Finished (Stable) roll generation @%s" % time.ctime()) diff --git a/openstack_election/owners.py b/openstack_election/owners.py index 9b9e7607..d8e21c43 100644 --- a/openstack_election/owners.py +++ b/openstack_election/owners.py @@ -590,8 +590,9 @@ def main(options): owners[owner]['affiliations'] = [] for affiliation in affiliations: if (not affiliation['end_date'] - or datetime.datetime.fromtmiestamp( - affiliation['end_date']) > after): + or datetime.datetime.fromtimestamp( + affiliation['end_date']) > + datetime.datetime.strptime(after, "%Y-%m-%d")): owners[owner]['affiliations'].append( affiliation['organization']['name']) invite = [owners[owner].get(