Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
swallow python error for python version (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmeyer authored Jun 22, 2017
1 parent 7fc8958 commit f84edc5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/gohai/platform/platform_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit f84edc5

Please sign in to comment.