From 4e6333fbcdf570e65f291847205489ac301ca13d Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 20 Mar 2014 11:51:03 +0100 Subject: [PATCH] Do not crash if an input does not have any type --- weboob/tools/browser2/page.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/weboob/tools/browser2/page.py b/weboob/tools/browser2/page.py index aea510e8..883b9c49 100644 --- a/weboob/tools/browser2/page.py +++ b/weboob/tools/browser2/page.py @@ -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]')