summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index a8c0cceb..0fbf9832 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1329,12 +1329,18 @@ def delete_dir_contents(dirname):
del_file(node_fullpath)
-def subp(args, data=None, rcs=None, env=None, capture=True, shell=False):
+def subp(args, data=None, rcs=None, env=None, capture=True, shell=False, hidden=False):
if rcs is None:
rcs = [0]
try:
- LOG.debug(("Running command %s with allowed return codes %s"
- " (shell=%s, capture=%s)"), args, rcs, shell, capture)
+
+ if not hidden:
+ LOG.debug(("Running command %s with allowed return codes %s"
+ " (shell=%s, capture=%s)"), args, rcs, shell, capture)
+ else:
+ LOG.debug(("Running hidden command to protect sensative output "
+ " Calling function: %s" ), hidden)
+
if not capture:
stdout = None
stderr = None