Make resilient to errors while receiving SMS (#37577)

This commit is contained in:
Oscar Calvo 2020-09-04 03:48:15 -07:00 committed by GitHub
parent 60c7a91794
commit 08d93b8349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

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

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"]
}

View File

@ -1703,7 +1703,7 @@ python-family-hub-local==0.0.2
python-forecastio==1.4.0
# homeassistant.components.sms
# python-gammu==3.0
# python-gammu==3.1
# homeassistant.components.gc100
python-gc100==1.0.3a