From 4923e555c94ab28ca0a3f27d107de066ae73c9da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20Karlsen?= Date: Wed, 1 Jun 2016 01:45:40 +0200 Subject: print command to be executed by execcmd() again if verbose config is enabled --- MgaRepo/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MgaRepo/util.py b/MgaRepo/util.py index 1237d12..8ef7845 100644 --- a/MgaRepo/util.py +++ b/MgaRepo/util.py @@ -48,6 +48,10 @@ def execcmd(*cmd, **kwargs): else: stderr = subprocess.STDOUT + verbose = config.getbool("global", "verbose", 0) + if verbose: + print("cmd: " + str(cmd).lstrip("(").rstrip(")").replace("', '", "' '"))) + proc = subprocess.Popen(cmdargs, shell=False, stdout=stdout, stderr=stderr, env=env) -- cgit v1.2.1