fix(metadata): correctly read metadata svc resp
This commit is contained in:
parent
a8a3b10277
commit
a5e5505b51
@ -21,7 +21,7 @@ func (ms *metadataService) UserData() ([]byte, error) {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp/100 != 2 {
|
||||
if resp.StatusCode / 100 != 2 {
|
||||
return []byte{}, nil
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if userdata == "" {
|
||||
if len(userdata) == 0 {
|
||||
log.Printf("No user data to handle, exiting.")
|
||||
os.Exit(0)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user