Use isErrIgnored() function wherever applicable. (#3343)

This commit is contained in:
Bala FA
2016-11-23 20:05:04 -08:00
committed by Harshavardhana
parent 4ef2d8940c
commit 0f2e493c9a
14 changed files with 49 additions and 84 deletions

View File

@@ -85,11 +85,9 @@ func loadAllBucketPolicies(objAPI ObjectLayer) (policies map[string]*bucketPolic
for _, bucket := range buckets {
policy, pErr := readBucketPolicy(bucket.Name, objAPI)
if pErr != nil {
if !isErrIgnored(pErr, []error{
// net.Dial fails for rpc client or any
// other unexpected errors during net.Dial.
errDiskNotFound,
}) {
// net.Dial fails for rpc client or any
// other unexpected errors during net.Dial.
if !isErrIgnored(pErr, errDiskNotFound) {
if !isErrBucketPolicyNotFound(pErr) {
pErrs = append(pErrs, pErr)
}