Commit d6f3caeb authored by bgrant0607's avatar bgrant0607

Merge pull request #2488 from smarterclayton/remove_chatty_error

Do not log an error when file does not exist
parents 16ea5a0d 2afa1207
...@@ -22,6 +22,7 @@ import ( ...@@ -22,6 +22,7 @@ import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"os"
"path/filepath" "path/filepath"
"strings" "strings"
...@@ -53,6 +54,9 @@ func ReadDockerConfigFile() (cfg DockerConfig, err error) { ...@@ -53,6 +54,9 @@ func ReadDockerConfigFile() (cfg DockerConfig, err error) {
absDockerConfigFileLocation, err = filepath.Abs(dockerConfigFileLocation) absDockerConfigFileLocation, err = filepath.Abs(dockerConfigFileLocation)
glog.V(2).Infof("looking for .dockercfg at %s", absDockerConfigFileLocation) glog.V(2).Infof("looking for .dockercfg at %s", absDockerConfigFileLocation)
contents, err := ioutil.ReadFile(absDockerConfigFileLocation) contents, err := ioutil.ReadFile(absDockerConfigFileLocation)
if os.IsNotExist(err) {
return make(DockerConfig), nil
}
if err != nil { if err != nil {
glog.Errorf("while trying to read %s: %v", absDockerConfigFileLocation, err) glog.Errorf("while trying to read %s: %v", absDockerConfigFileLocation, err)
return nil, err return nil, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment