Commit c3228586 authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by Vincent A

[caissedepargne] Raise BrowserIncorrectPassword if no redirect on cenet

This problem seems to be happening only for connections with wrong
credentials. Instead of making an assert we now raise a
BrowserIncorrectPassword.

Closes: 13871@zendesk 45881@sibi
parent 63cbad2e
......@@ -98,7 +98,8 @@ class CenetBrowser(LoginBrowser, StatesMixin):
elif not self.nuser:
raise BrowserIncorrectPassword("Erreur: Numéro d'utilisateur requis.")
assert "authMode" in data and data['authMode'] == 'redirect', 'should not be on the cenet website'
if "authMode" in data and data['authMode'] != 'redirect':
raise BrowserIncorrectPassword()
payload = {'contexte': '', 'dataEntree': None, 'donneesEntree': "{}", 'filtreEntree': "\"false\""}
res = self.cenet_vk.open(data=json.dumps(payload), headers={'Content-Type': "application/json"})
......
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