From 6e93c03438895beb42e17d1a9c7d3b3e81a5a9bd Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 26 Feb 2020 11:27:34 +0100 Subject: [PATCH] Set success=True when we're able to retrieve data from the sensor --- platypush/backend/sensor/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platypush/backend/sensor/__init__.py b/platypush/backend/sensor/__init__.py index f265ccf7..99d422fc 100644 --- a/platypush/backend/sensor/__init__.py +++ b/platypush/backend/sensor/__init__.py @@ -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)