Commit adc2cbef authored by Romain Pesche's avatar Romain Pesche Committed by Vincent A

[bouygues] handle case where subscription detail are not available

In some case, the subscription details page, where we get the
information for the subscription lab is not available.
We get a 401 error when getting it.

In this case, we can't get the phone numbers associated to the

We set then the subscription label to the subscription id without the
phone numbers.
parent cbad97f3
......@@ -104,7 +104,15 @@ class BouyguesBrowser(LoginBrowser):
for sub in
sub.subscriber = subscriber
sub.label = self.subscription_detail_page.go(, headers=self.headers).get_label()
sub.label = self.subscription_detail_page.go(, headers=self.headers).get_label()
except ClientError as e:
if e.response.status_code == 403:
# Sometimes, subscription_detail_page is not available for a subscription.
# It's impossible to get the tel number associated with it and create a label with.
sub.label =
yield sub
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