Skip to content

Commit 95c5f66

Browse files
committed
fix: async call workaround for Windows
1 parent 5629347 commit 95c5f66

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyterlab_wakatime/handlers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ async def post(self):
4242
return self.finish()
4343
self.log.info("wakatime-cli " + shlex.join(cmd_args))
4444

45+
# Async subprocess is required for non-blocking access to return code
46+
# However, it's not supported on Windows
47+
# As a workaround, create a Popen instance and leave it alone
4548
if platform.system() == "Windows":
46-
subprocess.call([WAKATIME_CLI, *cmd_args])
49+
subprocess.Popen([WAKATIME_CLI, *cmd_args])
4750
return self.finish()
4851

4952
proc = await asyncio.create_subprocess_exec(

0 commit comments

Comments
 (0)