mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-09 18:50:56 +08:00
Chore: Flake8, isort and Black (#40)
This commit is contained in:
+4
-4
@@ -19,16 +19,16 @@ def call_hook(sender, instance, **kwargs):
|
||||
f = getattr(m, func)
|
||||
except (ValueError, ImportError, AttributeError):
|
||||
logger.error(
|
||||
_("malformed return hook '%(hook)s' for [%(name)s]") % {'hook': instance.hook, 'name': instance.name}
|
||||
_("malformed return hook '%(hook)s' for [%(name)s]")
|
||||
% {"hook": instance.hook, "name": instance.name}
|
||||
)
|
||||
return
|
||||
try:
|
||||
f(instance)
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
_(
|
||||
"return hook %(hook)s failed on [%(name)s] because %(error)s"
|
||||
) % {'hook': instance.hook, 'name': instance.name, 'error': str(e)}
|
||||
_("return hook %(hook)s failed on [%(name)s] because %(error)s")
|
||||
% {"hook": instance.hook, "name": instance.name, "error": str(e)}
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user