Commit 3fba711d authored by Lucas Ficheux's avatar Lucas Ficheux Committed by ntome

[bnpcards] Added connection type logging at login

The module now logs which type of connection (Manager or Cardholder)
is logging in.
It will be useful to find connections suitable for build tasks.
parent 76445cc7
......@@ -76,10 +76,14 @@ class BnpcartesentrepriseBrowser(LoginBrowser):
if self.error.is_here() or self.page.is_error():
raise BrowserIncorrectPassword()
if self.type == '2' and self.page.is_corporate():
self.logger.info('Manager corporate connection')
raise SiteSwitch('corporate')
# ti corporate and ge corporate are not detected the same way ..
if 'corporate' in self.page.url:
self.logger.info('Carholder corporate connection')
self.is_corporate = True
else:
self.logger.info('Cardholder connection')
def ti_card_go(self):
if self.is_corporate:
......
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