examples: avoid lgtm warning about calling traceback.format_exception()

lgtm.com says:

  Call to function format_exception with too few arguments; should be no
  fewer than 3.
This commit is contained in:
Thomas Haller
2022-10-25 12:01:12 +02:00
parent fee0f7cad8
commit 9b80860ff4

View File

@@ -467,7 +467,7 @@ def run1():
log() log()
log("EXCEPTION:") log("EXCEPTION:")
log(f"{e}") log(f"{e}")
for tb in traceback.format_exception(e): for tb in traceback.format_exception(None, e, e.__traceback__):
for l in tb.split("\n"): for l in tb.split("\n"):
log(f">>> {l}") log(f">>> {l}")
return False return False