Set success=True when we're able to retrieve data from the sensor

This commit is contained in:
Fabio Manganiello 2020-02-26 11:27:34 +01:00
parent cb0dd900ab
commit 6e93c03438
1 changed files with 4 additions and 0 deletions

View File

@ -90,6 +90,10 @@ class SensorBackend(Backend):
try:
plugin = get_plugin(self.plugin, reload=reload)
data = plugin.get_data(**self.plugin_args).output
if reload:
self.logger.info('Backend successfully restored')
success = True
except Exception as e:
self.logger.warning('Unexpected exception while getting data: {}'.format(str(e)))
self.logger.exception(e)