From 9dbd75e5e4cc1b44b6d5dd11b05a405ac2f153f1 Mon Sep 17 00:00:00 2001 From: Richard Neumann Date: Tue, 22 Dec 2020 13:56:09 +0100 Subject: [PATCH] Refactored ErrorHandler. --- rcon/errorhandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcon/errorhandler.py b/rcon/errorhandler.py index 63a2bdb..09bb806 100644 --- a/rcon/errorhandler.py +++ b/rcon/errorhandler.py @@ -26,7 +26,7 @@ class ErrorHandler: def __exit__(self, typ, value, _): """Checks for connection errors and exits respectively.""" - for error, message, returncode in self.errors: - if typ is error or isinstance(value, error): + for exception, message, returncode in self.errors: + if typ is exception or isinstance(value, exception): self.logger.error(message) exit(returncode)