Fix an incorrect exception handling

This commit is contained in:
Raphael Michel
2024-12-04 16:56:30 +01:00
parent a747ab154a
commit 70f06a8f40

View File

@@ -81,7 +81,7 @@ class Command(BaseCommand):
try:
r = receiver(signal=periodic_task, sender=self)
except Exception as err:
if isinstance(Exception, KeyboardInterrupt):
if isinstance(err, KeyboardInterrupt):
raise err
if settings.SENTRY_ENABLED:
from sentry_sdk import capture_exception