From 87a477a5d6ac04bb01f9f916eed2ff0b5373bde5 Mon Sep 17 00:00:00 2001 From: JoeLametta Date: Sat, 26 Oct 2019 08:00:00 +0000 Subject: [PATCH] Fix wrong logger call Introduced in 048a31e3483792a6ce5984af79e9afa167c5900a. Signed-off-by: JoeLametta --- whipper/program/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/whipper/program/utils.py b/whipper/program/utils.py index 4d40eb4..dc1ce46 100644 --- a/whipper/program/utils.py +++ b/whipper/program/utils.py @@ -14,8 +14,8 @@ def eject_device(device): # `eject device` prints nothing to stdout subprocess.check_output(['eject', device], stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: - logger.warning(e.cmd, 'returned with exit code: ', e.returncode, - e.output) + logger.warning("command '%s' returned with exit code '%d' (%s)", + ' '.join(e.cmd), e.returncode, e.output.rstrip()) def load_device(device): @@ -28,8 +28,8 @@ def load_device(device): subprocess.check_output(['eject', '-t', device], stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: - logger.warning(e.cmd, 'returned with exit code: ', e.returncode, - e.output) + logger.warning("command '%s' returned with exit code '%d' (%s)", + ' '.join(e.cmd), e.returncode, e.output.rstrip()) def unmount_device(device):