MCPcopy Create free account
hub / github.com/DataDog/datadog-agent / getCommandPython

Function getCommandPython

cmd/agent/subcommands/integrations/command.go:275–289  ·  view source on GitHub ↗
(pythonMajorVersion string, useSysPython bool)

Source from the content-addressed store, hash-verified

273}
274
275func getCommandPython(pythonMajorVersion string, useSysPython bool) (string, error) {
276 if useSysPython {
277 return pythonBin, nil
278 }
279
280 pyPath := filepath.Join(rootDir, getRelPyPath(pythonMajorVersion))
281
282 if _, err := os.Stat(pyPath); err != nil {
283 if os.IsNotExist(err) {
284 return pyPath, errors.New("unable to find python executable")
285 }
286 }
287
288 return pyPath, nil
289}
290
291func validateArgs(args []string, local bool) error {
292 if len(args) > 1 {

Callers 4

detectPythonMinorVersionFunction · 0.85
pipFunction · 0.85
downloadWheelFunction · 0.85
installedVersionFunction · 0.85

Calls 2

JoinMethod · 0.80
getRelPyPathFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…