diff options
-rwxr-xr-x | batch-stabilize.py | 3 | ||||
-rw-r--r-- | common.py | 5 | ||||
-rwxr-xr-x | 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] @@ -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]}) |