diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 39689a57e6ecd6..46e2873ae48594 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1682,7 +1682,7 @@ def addHandler(self, hdlr): Add the specified handler to this logger. """ with _lock: - if not (hdlr in self.handlers): + if hdlr not in self.handlers: self.handlers.append(hdlr) def removeHandler(self, hdlr):