From 85a5fa0e24d89b5b8a41cc63f4c59e2e46faa4a6 Mon Sep 17 00:00:00 2001 From: "Pawel Hajdan, Jr" Date: Sat, 14 Jun 2014 11:41:35 +0200 Subject: Fix issue in batch-stabilize leading to errors from Bugzilla xmlrpclib.Fault: --- batch-stabilize.py | 3 ++- common.py | 5 +---- maintainer-timeout.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/batch-stabilize.py b/batch-stabilize.py index 2093da5..053cd19 100755 --- a/batch-stabilize.py +++ b/batch-stabilize.py @@ -68,7 +68,7 @@ if __name__ == "__main__": url = 'https://bugs.gentoo.org/xmlrpc.cgi' print 'You will be prompted for your Gentoo Bugzilla username and password (%s).' % url bugzilla = BugzillaProxy(url) - login(bugzilla) + user, login_data = login(bugzilla) with open(options.input_filename, "r") as input_file: stabilization_dict = {} @@ -188,6 +188,7 @@ if __name__ == "__main__": # We don't close bugs which still have other arches for obvious reasons, # and security bugs because stabilization is not the last step for them. params = {} + params['token'] = login_data['token'] params['ids'] = [bug_id] params['cc'] = {} params['cc']['remove'] = ['%s@gentoo.org' % options.arch] diff --git a/common.py b/common.py index cf89eb7..578b0e0 100644 --- a/common.py +++ b/common.py @@ -69,10 +69,7 @@ def login(bugzilla): params = {} params['login'] = user params['password'] = password - print 'Logging in' - bugzilla.User.login(params) - - return user + return user, bugzilla.User.login(params) class Bug: diff --git a/maintainer-timeout.py b/maintainer-timeout.py index ba8c322..76c7e59 100755 --- a/maintainer-timeout.py +++ b/maintainer-timeout.py @@ -29,7 +29,7 @@ if __name__ == "__main__": url = 'https://bugs.gentoo.org/xmlrpc.cgi' print 'You will be prompted for your Gentoo Bugzilla username and password (%s).' % url bugzilla = BugzillaProxy(url) - user = login(bugzilla) + user, login_data = login(bugzilla) bugs = bugzilla.Bug.search({'reporter': user, 'summary': ['stabilize', 'stabilization', 'stable'], 'resolution': ''})['bugs'] comments = bugzilla.Bug.comments({'ids': [bug['id'] for bug in bugs]}) -- cgit v1.2.3-65-gdbad