only return wget on 200
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
8c2168f588
commit
df1460aa69
4
wget.go
4
wget.go
|
@ -35,8 +35,8 @@ func Wget(url string) (*bytes.Buffer) {
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
log.Printf("res.StatusCode: %d\n", resp.StatusCode)
|
log.Printf("res.StatusCode: %d\n", resp.StatusCode)
|
||||||
if (resp.StatusCode == 404) {
|
if (resp.StatusCode != 200) {
|
||||||
handleError(fmt.Errorf("404"), -1)
|
handleError(fmt.Errorf(fmt.Sprint("%d", resp.StatusCode)), -1)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue