Show commands that are run.
This commit is contained in:
parent
a715a7c16b
commit
dc7a1a033c
|
@ -1,6 +1,6 @@
|
||||||
0.12 "" (released xx.xx.2010)
|
0.12 "" (released xx.xx.2010)
|
||||||
|
|
||||||
*
|
* Show commands that are run.
|
||||||
|
|
||||||
0.11 "Primer" (released 4.10.2010)
|
0.11 "Primer" (released 4.10.2010)
|
||||||
|
|
||||||
|
|
|
@ -86,9 +86,16 @@ def backtick (cmd):
|
||||||
return subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
|
return subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
|
||||||
|
|
||||||
|
|
||||||
|
def quote_arg (arg):
|
||||||
|
if " " in arg:
|
||||||
|
return '"%s"' % arg
|
||||||
|
return arg
|
||||||
|
|
||||||
|
|
||||||
def run (cmd, **kwargs):
|
def run (cmd, **kwargs):
|
||||||
"""Run command without error checking.
|
"""Run command without error checking.
|
||||||
@return: command return code"""
|
@return: command return code"""
|
||||||
|
log_info("running %s" % " ".join(map(quote_arg, cmd)))
|
||||||
return subprocess.call(cmd, **kwargs)
|
return subprocess.call(cmd, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue