Merge pull request #1149 from AlexandreAANP/fix/windows-asyncio-loop

Fix event loop handling for Windows platform in compose_up function
This commit is contained in:
Povilas Kanapickas
2025-03-01 16:43:26 +02:00
committed by GitHub
2 changed files with 4 additions and 3 deletions

View File

@@ -0,0 +1 @@
- Fixed NotImplementedError in case script is interrupted on Windows

View File

@@ -2777,7 +2777,7 @@ async def compose_up(compose: PodmanCompose, args):
max_service_length = curr_length if curr_length > max_service_length else max_service_length
tasks = set()
if sys.platform != 'win32':
loop = asyncio.get_event_loop()
loop.add_signal_handler(signal.SIGINT, lambda: [t.cancel("User exit") for t in tasks])