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

swallow python error for python version #51

Merged
merged 1 commit into from
Jun 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions 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