From a10cda2b6f1f69385944fde5ae5de6dbee22ced4 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 23 Oct 2015 16:00:06 -0600 Subject: [PATCH] misc.sh(): Don't log.exception() before raise log.exception() logs the traceback, and raise will also cause it to be logged. There's no need to have it logged twice; additionally, when sh() was being called within a try/except clause we were confusingly logging an expected failure. Callers can choose to log if they want. Signed-off-by: Zack Cerza --- teuthology/misc.py | 1 - 1 file changed, 1 deletion(-) diff --git a/teuthology/misc.py b/teuthology/misc.py index e5b6a7d88e..ea5b3ab7ed 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -1311,7 +1311,6 @@ def sh(command): output = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True) except subprocess.CalledProcessError as e: - log.exception(command + " error " + str(e.output)) raise e if output.strip(): log.debug(command + " output " + str(output)) -- 2.39.5