aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <proyvind@moondrake.org>2016-06-01 01:45:40 +0200
committerPer Øyvind Karlsen <proyvind@moondrake.org>2016-06-01 01:45:40 +0200
commit4923e555c94ab28ca0a3f27d107de066ae73c9da (patch)
tree301ce227be11373179b324235bae0fe09c0f4b04 /MgaRepo
parent7e888745c754cf01723c2e06485ef362127b07d4 (diff)
downloadmgarepo-4923e555c94ab28ca0a3f27d107de066ae73c9da.tar
mgarepo-4923e555c94ab28ca0a3f27d107de066ae73c9da.tar.gz
mgarepo-4923e555c94ab28ca0a3f27d107de066ae73c9da.tar.bz2
mgarepo-4923e555c94ab28ca0a3f27d107de066ae73c9da.tar.xz
mgarepo-4923e555c94ab28ca0a3f27d107de066ae73c9da.zip
print command to be executed by execcmd() again if verbose config is enabled
Diffstat (limited to 'MgaRepo')
-rw-r--r--MgaRepo/util.py4
1 files changed, 4 insertions, 0 deletions
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)