From 3da9f696281e802b4473ecea4da23c74b8ba47f2 Mon Sep 17 00:00:00 2001 From: Craig Tracey Date: Sat, 15 Nov 2014 19:32:07 -0500 Subject: [PATCH] Make the execute command a little less chatty All we really care about is whether the command worked or not. So, leave the details about what happened for the debug log. --- giftwrap/util.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/giftwrap/util.py b/giftwrap/util.py index 5e4c3ca..5c1ff3f 100644 --- a/giftwrap/util.py +++ b/giftwrap/util.py @@ -36,7 +36,7 @@ def execute(command, cwd=None, exit=0): if cwd: original_dir = os.getcwd() os.chdir(cwd) - LOG.info("Changed directory to %s", cwd) + LOG.debug("Changed directory to %s", cwd) LOG.info("Running: '%s'", command) process = subprocess.Popen(command, @@ -48,12 +48,12 @@ def execute(command, cwd=None, exit=0): (out, err) = process.communicate() exitcode = process.wait() - LOG.info("Command exitted with rc: %s; STDOUT: %s; STDERR: %s" % + LOG.debug("Command exitted with rc: %s; STDOUT: %s; STDERR: %s" % (exitcode, out, err)) if cwd: os.chdir(original_dir) - LOG.info("Changed directory back to %s", original_dir) + LOG.debug("Changed directory back to %s", original_dir) if exitcode != exit: raise Exception("Failed to run '%s': rc: %d, out: '%s', err: '%s'" %