From e30ab0522d66a2e18d1f00607733906c054544de Mon Sep 17 00:00:00 2001 From: chipx86 Date: Tue, 14 Apr 2009 07:08:26 +0000 Subject: Patch by Eric Huss to fix an infinite recursion problem when using post-review with invalid cookies. Fixes bug #808. Reviewed at http://reviews.review-board.org/r/813/ --- AUTHORS | 10 +++++----- scripts/post-review | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AUTHORS b/AUTHORS index f7fca71..5c1ed96 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,9 +6,9 @@ Lead Developers: Contributors: - * Eric Huss - * Lepton Wu - * Luke Lu - * Paul Scott + * Eric Huss + * Lepton Wu + * Luke Lu + * Paul Scott * Raghu Kaippully - * Stacey Sheldon + * Stacey Sheldon diff --git a/scripts/post-review b/scripts/post-review index 49504db..a502cda 100755 --- a/scripts/post-review +++ b/scripts/post-review @@ -279,12 +279,12 @@ class ReviewBoardServer(object): opener.addheaders = [('User-agent', 'post-review/' + VERSION)] urllib2.install_opener(opener) - def login(self): + def login(self, force=False): """ Logs in to a Review Board server, prompting the user for login information if needed. """ - if self.has_valid_cookie(): + if not force and self.has_valid_cookie(): return print "==> Review Board Login Required" @@ -2004,7 +2004,7 @@ def tempt_fate(server, tool, changenum, diff_content=None, except APIError, e: rsp, = e.args if rsp['err']['code'] == 103: # Not logged in - server.login() + server.login(force=True) tempt_fate(server, tool, changenum, diff_content, parent_diff_content, submit_as) return -- cgit v1.2.3