From 5f4598814abfeca13382f91f6dce8c33c3d6e258 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Thu, 19 Jul 2018 00:45:04 -0600 Subject: [PATCH] Clear screen before printing abort warning * Otherwise the "Abort" string is in the middle of the ddrescue output * Also added secondary return code to be treated as a user abort --- .bin/Scripts/functions/ddrescue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/ddrescue.py b/.bin/Scripts/functions/ddrescue.py index f04da365..5ef7b4cf 100644 --- a/.bin/Scripts/functions/ddrescue.py +++ b/.bin/Scripts/functions/ddrescue.py @@ -750,7 +750,8 @@ def run_ddrescue(source, dest, settings): # Was ddrescue aborted? return_code = ddrescue_proc.poll() - if return_code is None: + if return_code is None or return_code is 130: + clear_screen() print_warning('Aborted') mark_pass_incomplete(source) break