From b9fdb63a57f42428d7a6f1f2d2c7ffa90f6ef888 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 22 Nov 2022 21:02:18 +0100 Subject: [PATCH] core: fix lint Signed-off-by: Jens Langhammer --- authentik/core/management/commands/shell.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/core/management/commands/shell.py b/authentik/core/management/commands/shell.py index a348fd476..271c0f7a4 100644 --- a/authentik/core/management/commands/shell.py +++ b/authentik/core/management/commands/shell.py @@ -90,6 +90,7 @@ class Command(BaseCommand): # pylint: disable=exec-used exec(options["command"], namespace) # nosec # noqa return + try: hook = sys.__interactivehook__ except AttributeError: @@ -99,7 +100,7 @@ class Command(BaseCommand): else: try: hook() - except Exception: + except Exception: # pylint: disable=broad-except # Match the behavior of the cpython shell where an error in # sys.__interactivehook__ prints a warning and the exception # and continues.