Do not crash if an input does not have any type
This commit is contained in:
parent
dc7a83cba0
commit
4e6333fbcd
1 changed files with 5 additions and 2 deletions
|
|
@ -367,8 +367,11 @@ class Form(OrderedDict):
|
|||
except KeyError:
|
||||
continue
|
||||
|
||||
if inp.attrib['type'] in ('checkbox', 'radio') and not 'checked' in inp:
|
||||
continue
|
||||
try:
|
||||
if inp.attrib['type'] in ('checkbox', 'radio') and not 'checked' in inp:
|
||||
continue
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
if inp.tag == 'select':
|
||||
options = inp.xpath('.//option[@selected]')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue