You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifself.loggerisnotNone:
self.logger.debug("Setting last will properties")
The check for the logger makes the code more difficult to read. Setting a logger with NullHandler by default and replacing the handler with StreamHandler in enable_logger() would avoid these contructs.
The text was updated successfully, but these errors were encountered:
The whole idea of a null handler (the null object pattern in general) is so you don't have to do checks like that. Someone didn't get the memo I guess.
There is a lot blocks in
MQTT
that go like this:The check for the logger makes the code more difficult to read. Setting a logger with
NullHandler
by default and replacing the handler withStreamHandler
inenable_logger()
would avoid these contructs.The text was updated successfully, but these errors were encountered: