Skip to content

Commit fc093ee

Browse files
author
Golf Player
committed
Got the if condition backwards....
1 parent 5306c3f commit fc093ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nbclient/util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ async def ensure_async(obj):
9494
def run_hook(hook, *args):
9595
if hook is None:
9696
return
97-
if inspect.isawaitable(hook):
97+
if not inspect.isawaitable(hook):
98+
future = hook(*args)
99+
else:
98100
loop = asyncio.get_event_loop()
99101
future = loop.run_in_executor(None, hook, *args)
100-
else:
101-
future = hook(*args)
102102
asyncio.ensure_future(future)

0 commit comments

Comments
 (0)