From 3e41a3610929e11906522bd63bc8a115270926ef Mon Sep 17 00:00:00 2001 From: "Afshin T. Darian" Date: Wed, 10 Mar 2021 15:13:55 +0000 Subject: [PATCH] Fix for UnboundLocalError in shutdown --- jupyter_server/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jupyter_server/utils.py b/jupyter_server/utils.py index 26b6d61754..e6f0430a03 100644 --- a/jupyter_server/utils.py +++ b/jupyter_server/utils.py @@ -224,5 +224,7 @@ def wrapped(): if str(e) == 'This event loop is already running': # just return a Future, hoping that it will be awaited result = asyncio.ensure_future(maybe_async) + else: + raise e return result - return wrapped() \ No newline at end of file + return wrapped()