core: fix lint
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
94833dd1e7
commit
b9fdb63a57
|
@ -90,6 +90,7 @@ class Command(BaseCommand):
|
||||||
# pylint: disable=exec-used
|
# pylint: disable=exec-used
|
||||||
exec(options["command"], namespace) # nosec # noqa
|
exec(options["command"], namespace) # nosec # noqa
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
hook = sys.__interactivehook__
|
hook = sys.__interactivehook__
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
@ -99,7 +100,7 @@ class Command(BaseCommand):
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
hook()
|
hook()
|
||||||
except Exception:
|
except Exception: # pylint: disable=broad-except
|
||||||
# Match the behavior of the cpython shell where an error in
|
# Match the behavior of the cpython shell where an error in
|
||||||
# sys.__interactivehook__ prints a warning and the exception
|
# sys.__interactivehook__ prints a warning and the exception
|
||||||
# and continues.
|
# and continues.
|
||||||
|
|
Reference in New Issue