Commit dd272b39 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by ntome

banquepopulaire: Don't crash without simplejson

parent 012c7486
Pipeline #1750 failed with stages
in 3 minutes and 33 seconds
......@@ -369,7 +369,7 @@ class AlreadyLoginPage(LoggedPage, MyHTMLPage):
doc = json.loads(self.response.text)
if 'response' in doc:
return doc['response']['status'] == 'AUTHENTICATION_SUCCESS' and 'saml2_post' in doc['response']
except json.decoder.JSONDecodeError:
except ValueError:
# not a json page
# so it should be Login2Page
return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment