Skip to content

Commit a54f0fa

Browse files
authored
Merge pull request #1149 from AlexandreAANP/fix/windows-asyncio-loop
Fix event loop handling for Windows platform in compose_up function
2 parents 3353697 + fd40133 commit a54f0fa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fixed NotImplementedError in case script is interrupted on Windows

podman_compose.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2777,9 +2777,9 @@ async def compose_up(compose: PodmanCompose, args):
27772777
max_service_length = curr_length if curr_length > max_service_length else max_service_length
27782778

27792779
tasks = set()
2780-
2781-
loop = asyncio.get_event_loop()
2782-
loop.add_signal_handler(signal.SIGINT, lambda: [t.cancel("User exit") for t in tasks])
2780+
if sys.platform != 'win32':
2781+
loop = asyncio.get_event_loop()
2782+
loop.add_signal_handler(signal.SIGINT, lambda: [t.cancel("User exit") for t in tasks])
27832783

27842784
for i, cnt in enumerate(compose.containers):
27852785
# Add colored service prefix to output by piping output through sed

0 commit comments

Comments
 (0)