FIX: Proper fix for process_data taking a variable number of arguments

This commit is contained in:
Fabio Manganiello 2022-02-17 11:50:04 +01:00
parent 71cb73cf63
commit 1933ec709f
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -174,7 +174,7 @@ class SensorBackend(Backend):
if plugin and hasattr(plugin, 'close'): if plugin and hasattr(plugin, 'close'):
plugin.close() plugin.close()
def process_data(self, *, new_data, **_): def process_data(self, new_data, *_, **__):
if new_data is not None and new_data not in ({}, []): if new_data is not None and new_data not in ({}, []):
self.bus.post(SensorDataChangeEvent(data=new_data, source=self.plugin or self.__class__.__name__)) self.bus.post(SensorDataChangeEvent(data=new_data, source=self.plugin or self.__class__.__name__))