You don't really have to check the length for what is worth, since if there is no output or errors, you'll get an empty list. So this could be:

```python
if output:
    self.logger.debug("".join(output))
```