worker: remove duplicated tests
This commit is contained in:
parent
418ab08c4b
commit
bae5a5e3ad
@ -75,13 +75,6 @@ func DetectData(path string, format string, toExtract []string, maxFileSize int6
|
|||||||
log.Warningf("could not download layer: %s", err)
|
log.Warningf("could not download layer: %s", err)
|
||||||
return nil, cerrors.ErrCouldNotDownload
|
return nil, cerrors.ErrCouldNotDownload
|
||||||
}
|
}
|
||||||
if math.Floor(float64(r.StatusCode/100)) != 2 {
|
|
||||||
log.Warningf("could not download layer: got status code %d, expected 2XX", r.StatusCode)
|
|
||||||
return nil, cerrors.ErrCouldNotDownload
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
log.Warningf("could not download layer: %s", err)
|
|
||||||
return nil, cerrors.ErrCouldNotDownload
|
|
||||||
if r.StatusCode == 404 {
|
if r.StatusCode == 404 {
|
||||||
return nil, cerrors.ErrNotFound
|
return nil, cerrors.ErrNotFound
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user