From 7b48b6d9044ad5d8a32c50ffcec1acf84e0559a8 Mon Sep 17 00:00:00 2001 From: Greg Meyer Date: Wed, 21 Jun 2017 16:54:02 -0400 Subject: [PATCH] swallow python error for python version --- platform/platform_common.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/platform_common.go b/platform/platform_common.go index 02392c2..90c64d5 100644 --- a/platform/platform_common.go +++ b/platform/platform_common.go @@ -33,10 +33,13 @@ func getPlatformInfo() (platformInfo map[string]interface{}, err error) { platformInfo, err = getArchInfo() platformInfo["goV"] = strings.Replace(runtime.Version(), "go", "", -1) - pythonV, err := getPythonVersion() + // If this errors, swallow the error. + // It will usually mean that Python is not on the PATH + // and we don't care about that. + pythonV, e := getPythonVersion() // if there was no failure, add the python variables to the platformInfo - if err == nil { + if e == nil { platformInfo["pythonV"] = pythonV }