change panic to fatal log
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"kube-forge/internal/logging"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
@@ -22,6 +23,6 @@ func main() {
|
||||
pipPlatform := platforms[strings.Join([]string{os, arch}, "-")]
|
||||
err := pip.CreateEmbeddedPipPackages("requirements.txt", os, arch, pipPlatform, "./data/")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
logging.Log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"kube-forge/internal/logging"
|
||||
"kube-forge/internal/python/data"
|
||||
"kube-forge/internal/resources"
|
||||
"os"
|
||||
@@ -117,7 +118,7 @@ func NewPythonExec() *PythonExec {
|
||||
|
||||
pythonLibFs, err := embed_util.NewEmbeddedFilesWithTmpDir(data.Data, pythonLibDir, true)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
logging.Log.Fatal(err)
|
||||
}
|
||||
pythonLibFsPath := pythonLibFs.GetExtractedPath()
|
||||
resourcesFs, _ := embed_util.NewEmbeddedFilesWithTmpDir(resources.Kubespray, resourcesDir, true)
|
||||
|
||||
Reference in New Issue
Block a user