Allow maxpackages to be set in the config file.

This commit is contained in:
Jason Tibbitts 2013-06-14 22:24:37 -05:00
parent d28d94f584
commit 5b5aa57f9d
2 changed files with 4 additions and 0 deletions

View file

@ -6,3 +6,4 @@ url = "https://bugzilla.redhat.com/xmlrpc.cgi"
<% end %>
username = "package-review@lists.fedoraproject.org"
password = "<%= packagereviewbugzilla %>"
maxpackages = 5

View file

@ -606,6 +606,9 @@ if __name__ == '__main__':
options = parse_commandline()
verbose = options.verbose
config = parse_config(options.configfile)
if config['maxpackages']:
maxpackages = int(config['maxpackages'])
dbprint("Limiting to {} packages".format(maxpackages))
bz = bugzilla.RHBugzilla(url=config['url'], cookiefile=None, user=config['username'], password=config['password'])
t = time.time()
(bugs, bugdata, usermap) = run_query(bz)