Too broad exception was cought without notifying about actual error - when Telegram isn't enabled
This commit is contained in:
parent
76bd40c655
commit
0dd1ae9ac5
@ -156,7 +156,7 @@ class Citizen(CitizenAPI):
|
|||||||
raise ErepublikException("Something went wrong! Can't find token in page! Exiting!")
|
raise ErepublikException("Something went wrong! Can't find token in page! Exiting!")
|
||||||
try:
|
try:
|
||||||
self.update_citizen_info(resp.text)
|
self.update_citizen_info(resp.text)
|
||||||
except:
|
except (AttributeError, json.JSONDecodeError, ValueError, KeyError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def _login(self):
|
def _login(self):
|
||||||
@ -212,8 +212,8 @@ class Citizen(CitizenAPI):
|
|||||||
return self.get(url, **kwargs)
|
return self.get(url, **kwargs)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.update_citizen_info(html=response.text)
|
self.update_citizen_info(response.text)
|
||||||
except:
|
except (AttributeError, json.JSONDecodeError, ValueError, KeyError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if self._errors_in_response(response):
|
if self._errors_in_response(response):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user