Remove redundant file check for capi_whitelists_path (#2728)

This commit is contained in:
mmetc 2024-01-12 14:17:01 +01:00 committed by GitHub
parent adba4e2a2f
commit 6960419a2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 5 deletions

View file

@ -356,10 +356,6 @@ func (s *LocalApiServerCfg) LoadCapiWhitelists() error {
return nil
}
if _, err := os.Stat(s.CapiWhitelistsPath); os.IsNotExist(err) {
return fmt.Errorf("capi whitelist file '%s' does not exist", s.CapiWhitelistsPath)
}
fd, err := os.Open(s.CapiWhitelistsPath)
if err != nil {
return fmt.Errorf("while opening capi whitelist file: %s", err)