Description

Gettext string is used by CancelLogin in MoinMoin/auth/openidrp.py:_handle_name_continuation before being declared.

Component selection

Workaround

The below patch should make it obvious where the problem lies and what the fix is.

=== modified file 'MoinMoin/auth/openidrp.py'
--- MoinMoin/auth/openidrp.py   2010-03-19 15:01:10 +0000
+++ MoinMoin/auth/openidrp.py   2010-03-19 15:02:06 +0000
@@ -181,10 +181,10 @@
             return CancelLogin(_('OpenID failure.'))

     def _handle_name_continuation(self, request):
+        _ = request.getText
         if not 'openid.id' in request.session:
             return CancelLogin(_('No OpenID found in session.'))

-        _ = request.getText
         newname = request.form.get('username', '')
         if not newname:
             return MultistageFormLogin(self._get_account_name)

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.9.2GetTextStringUsedBeforeDeclared (last edited 2010-03-19 19:01:59 by ThomasWaldmann)