Enhance the helm plugin error message 77/70277/1
authorHong Guan <hong.guan@att.com>
Thu, 11 Oct 2018 17:53:51 +0000 (13:53 -0400)
committerHong Guan <hg4105@att.com>
Thu, 11 Oct 2018 17:53:51 +0000 (13:53 -0400)
Change-Id: I872b799142b1bb7fe7f1f546646fa4fb325f7698
Issue-ID: CCSDK-619
Signed-off-by: Hong Guan <hg4105@att.com>
helm/plugin/tasks.py

index 4ffcd81..3374e94 100644 (file)
@@ -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))