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

View file

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