Allow maxpackages to be set in the config file.
This commit is contained in:
parent
d28d94f584
commit
5b5aa57f9d
2 changed files with 4 additions and 0 deletions
|
@ -6,3 +6,4 @@ url = "https://bugzilla.redhat.com/xmlrpc.cgi"
|
||||||
<% end %>
|
<% end %>
|
||||||
username = "package-review@lists.fedoraproject.org"
|
username = "package-review@lists.fedoraproject.org"
|
||||||
password = "<%= packagereviewbugzilla %>"
|
password = "<%= packagereviewbugzilla %>"
|
||||||
|
maxpackages = 5
|
||||||
|
|
|
@ -606,6 +606,9 @@ if __name__ == '__main__':
|
||||||
options = parse_commandline()
|
options = parse_commandline()
|
||||||
verbose = options.verbose
|
verbose = options.verbose
|
||||||
config = parse_config(options.configfile)
|
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'])
|
bz = bugzilla.RHBugzilla(url=config['url'], cookiefile=None, user=config['username'], password=config['password'])
|
||||||
t = time.time()
|
t = time.time()
|
||||||
(bugs, bugdata, usermap) = run_query(bz)
|
(bugs, bugdata, usermap) = run_query(bz)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue