mirror of
https://github.com/containers/podman-compose.git
synced 2025-06-20 19:57:56 +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,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
|
max_service_length = curr_length if curr_length > max_service_length else max_service_length
|
||||||
|
|
||||||
tasks = set()
|
tasks = set()
|
||||||
|
if sys.platform != 'win32':
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
loop.add_signal_handler(signal.SIGINT, lambda: [t.cancel("User exit") for t in tasks])
|
loop.add_signal_handler(signal.SIGINT, lambda: [t.cancel("User exit") for t in tasks])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user