mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-13 20:18:39 +02:00
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:
commit
a54f0fa573
1
newsfragments/windows_not_implemented_error.bugfix
Normal file
1
newsfragments/windows_not_implemented_error.bugfix
Normal file
@ -0,0 +1 @@
|
||||
- Fixed NotImplementedError in case script is interrupted on Windows
|
@ -2777,9 +2777,9 @@ async def compose_up(compose: PodmanCompose, args):
|
||||
max_service_length = curr_length if curr_length > max_service_length else max_service_length
|
||||
|
||||
tasks = set()
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.add_signal_handler(signal.SIGINT, lambda: [t.cancel("User exit") for t in tasks])
|
||||
if sys.platform != 'win32':
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.add_signal_handler(signal.SIGINT, lambda: [t.cancel("User exit") for t in tasks])
|
||||
|
||||
for i, cnt in enumerate(compose.containers):
|
||||
# Add colored service prefix to output by piping output through sed
|
||||
|
Loading…
Reference in New Issue
Block a user