py3 compat

Fixes #2114
This commit is contained in:
Leonel Câmara
2019-03-01 15:05:26 +00:00
committed by GitHub
parent 8dcb4326c6
commit ef6814d452
+1 -1
View File
@@ -121,7 +121,7 @@ class WebClient(object):
self.method = 'POST' if method=='auto' else method
# if there is only one form, set _formname automatically
if not '_formname' in data and len(self.forms) == 1:
data['_formname'] = self.forms.keys()[0]
data['_formname'] = next(iter(self.forms.keys())) # Use the first key
# if there is no formkey but it is known, set it
if '_formname' in data and not '_formkey' in data and \