From fc6951077155f8a948a077b5531be95d14f5375c Mon Sep 17 00:00:00 2001 From: Alessandro Astone Date: Fri, 14 Feb 2025 00:00:47 +0100 Subject: [PATCH] lxc: Handle CTRL+C silently during shell commands --- tools/helpers/lxc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/helpers/lxc.py b/tools/helpers/lxc.py index 3a8edf8..bdd2403 100644 --- a/tools/helpers/lxc.py +++ b/tools/helpers/lxc.py @@ -472,7 +472,12 @@ def shell(args): command.extend(args.COMMAND) else: command.append("/system/bin/sh") - subprocess.run(command) + + try: + subprocess.run(command) + except KeyboardInterrupt: + pass + if state == "FROZEN": freeze(args) -- 2.47.3