From e1010a66beee26a34b25288e2dc02f1b4bb53533 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Doktor?= Date: Wed, 3 Aug 2016 13:53:02 +0200 Subject: [PATCH] avocado.utils.process: Unify CmdError messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The interrupted message lacked '' around the cmd and ignored the additional_text. Signed-off-by: Lukáš Doktor --- avocado/utils/process.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/avocado/utils/process.py b/avocado/utils/process.py index a4943e95..b66c9917 100644 --- a/avocado/utils/process.py +++ b/avocado/utils/process.py @@ -83,8 +83,9 @@ class CmdError(Exception): def __str__(self): if self.result is not None: if self.result.interrupted: - return "Command %s interrupted by user (Ctrl+C)" % self.command - if self.result.exit_status is None: + msg = "Command '%s' interrupted by user (Ctrl+C)" + msg %= self.command + elif self.result.exit_status is None: msg = "Command '%s' failed and is not responding to signals" msg %= self.command else: -- GitLab