From: Hong Guan Date: Thu, 11 Oct 2018 17:53:51 +0000 (-0400) Subject: Enhance the helm plugin error message X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=ac39f88aa15b511dab1230720057b9737d38c102;p=ccsdk%2Fplatform%2Fplugins.git Enhance the helm plugin error message Change-Id: I872b799142b1bb7fe7f1f546646fa4fb325f7698 Issue-ID: CCSDK-619 Signed-off-by: Hong Guan --- 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))