Skip to content

Commit

Permalink
Merge pull request #114 from cviecco/making-warning-clearer
Browse files Browse the repository at this point in the history
removing warning text for kunernetes as it is not actionable
  • Loading branch information
keep94 authored Nov 6, 2017
2 parents cc526ea + 449a184 commit 4cef763
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/client/twofa/twofa.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,13 @@ func doCertRequest(client *http.Client, authCookies []*http.Cookie, url, filedat
}
resp, err := client.Do(req) // Client.Get(targetUrl)
if err != nil {
logger.Printf("Failure to do x509 req %s", err)
logger.Printf("Failure to do cert request %s", err)
return nil, err
}

defer resp.Body.Close()
if resp.StatusCode != 200 {
logger.Printf("got error from call %s, url='%s'\n", resp.Status, url)
return nil, err
return nil, fmt.Errorf("got error from call %s, url='%s'\n", resp.Status, url)
}
return ioutil.ReadAll(resp.Body)

Expand Down Expand Up @@ -236,7 +235,7 @@ func getCertsFromServer(
pemKey,
logger)
if err != nil {
logger.Printf("Warning: could not get the kubernets cert")
//logger.Printf("Warning: could not get the kubernets cert (old server?) err=%s \n", err)
kubernetesCert = nil
//return nil, nil, nil, err
}
Expand Down

0 comments on commit 4cef763

Please sign in to comment.