Index: lt8900_spi/__init__.py ================================================================== --- lt8900_spi/__init__.py +++ lt8900_spi/__init__.py @@ -231,11 +231,11 @@ def __del__(self): self._spi.close() def _debug(self, message): - if 'debug_log_command' in self._config: + if self._config is not None and 'debug_log_command' in self._config: self._config['debug_log_command'](message) return None def _reset_device(self): if self._config is not None: