I would change this to:
```
if filename:
    m = self.flash_re.match(filename)
else:
    m = False
    self.config.logger.debug(...)
```

That way it's clear what the intention is.