summaryrefslogtreecommitdiffstats
path: root/helm
diff options
context:
space:
mode:
authorHong Guan <hong.guan@att.com>2018-10-11 13:53:51 -0400
committerHong Guan <hg4105@att.com>2018-10-11 13:53:51 -0400
commitac39f88aa15b511dab1230720057b9737d38c102 (patch)
tree53dc2a647e71acee4b824c2e656dd3340a95126b /helm
parentff744f3655438bd10de1f6b4558c2d4715e9518c (diff)
Enhance the helm plugin error message
Change-Id: I872b799142b1bb7fe7f1f546646fa4fb325f7698 Issue-ID: CCSDK-619 Signed-off-by: Hong Guan <hg4105@att.com>
Diffstat (limited to 'helm')
-rw-r--r--helm/plugin/tasks.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/helm/plugin/tasks.py b/helm/plugin/tasks.py
index 4ffcd81..3374e94 100644
--- a/helm/plugin/tasks.py
+++ b/helm/plugin/tasks.py
@@ -48,9 +48,12 @@ def execute_command(_command):
}
ctx.logger.debug('subprocess_args {0}.'.format(subprocess_args))
-
- process = subprocess.Popen(**subprocess_args)
- output, error = process.communicate()
+ try:
+ process = subprocess.Popen(**subprocess_args)
+ output, error = process.communicate()
+ except Exception as e:
+ ctx.logger.debug(str(e))
+ return False
ctx.logger.debug('command: {0} '.format(_command))
ctx.logger.debug('output: {0} '.format(output))