comparison roundup/cgi/client.py @ 4802:e1ffab417c28

Yet another instance of a TypeError fixed
author Ralf Schlatterbeck <rsc@runtux.com>
date Mon, 08 Jul 2013 11:14:53 +0200
parents bff9e4145f70
children bc4144417861
comparison
equal deleted inserted replaced
4801:bff9e4145f70 4802:e1ffab417c28
757 interface and short-circuit all further processing if they're not. 757 interface and short-circuit all further processing if they're not.
758 """ 758 """
759 # allow Anonymous to use the "login" and "register" actions (noting 759 # allow Anonymous to use the "login" and "register" actions (noting
760 # that "register" has its own "Register" permission check) 760 # that "register" has its own "Register" permission check)
761 761
762 if ':action' in self.form: 762 action = ''
763 action = self.form[':action'] 763 try:
764 elif '@action' in self.form: 764 if ':action' in self.form:
765 action = self.form['@action'] 765 action = self.form[':action']
766 else: 766 elif '@action' in self.form:
767 action = '' 767 action = self.form['@action']
768 except TypeError:
769 pass
768 if isinstance(action, list): 770 if isinstance(action, list):
769 raise SeriousError('broken form: multiple @action values submitted') 771 raise SeriousError('broken form: multiple @action values submitted')
770 elif action != '': 772 elif action != '':
771 action = action.value.lower() 773 action = action.value.lower()
772 if action in ('login', 'register'): 774 if action in ('login', 'register'):

Roundup Issue Tracker: http://roundup-tracker.org/