Google's expected crashes are now a warning - code should be pollished
This commit is contained in:
parent
90e6fd1ed8
commit
be10bfe44c
1 changed files with 48 additions and 46 deletions
|
@ -170,6 +170,9 @@ class GoogleVoiceClient(object):
|
||||||
self.restart = False
|
self.restart = False
|
||||||
self.logger.warn("Restart Google Voice. Language: {}".format(self.language_code))
|
self.logger.warn("Restart Google Voice. Language: {}".format(self.language_code))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
if "305" in str(e):
|
||||||
|
self.logger.warning(f"Long Google Voice: {e}")
|
||||||
|
else:
|
||||||
self.logger.critical(f"Crashed Google Voice: {e}")
|
self.logger.critical(f"Crashed Google Voice: {e}")
|
||||||
|
|
||||||
# sending an extra message is deprecated since we ignore finals anyway
|
# sending an extra message is deprecated since we ignore finals anyway
|
||||||
|
@ -229,4 +232,3 @@ class GoogleVoiceClient(object):
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
self.logger.warn("Destroyed google object")
|
self.logger.warn("Destroyed google object")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue