Make resilient to errors while receiving SMS (#37577)

This commit is contained in:
Oscar Calvo authored and GitHub committed 2020-09-04 12:48:15 +02:00
1 parent 60c7a91794
commit 08d93b8349
3 files changed
+6 -3

No files matched your search

+4 -1
View File
@@ -108,7 +108,10 @@ class Gateway:
# delete retrieved sms
_LOGGER.debug("Deleting message")
state_machine.DeleteSMS(Folder=0, Location=entry[0]["Location"])
try:
state_machine.DeleteSMS(Folder=0, Location=entry[0]["Location"])
except gammu.ERR_MEMORY_NOT_AVAILABLE:
_LOGGER.error("Error deleting SMS, memory not available")
else:
_LOGGER.debug("Not all parts have arrived")
break
+1 -1
View File
@@ -3,6 +3,6 @@
"name": "SMS notifications via GSM-modem",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/sms",
"requirements": ["python-gammu==3.0"],
"requirements": ["python-gammu==3.1"],
"codeowners": ["@ocalvo"]
}