Merge pull request #2153 from jxdv/update-ioerror

remove deprecated IOError
This commit is contained in:
Kubernetes Prow Robot 2024-02-12 09:37:31 -08:00 committed by GitHub
commit 4c9c058f0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -372,7 +372,7 @@ class FakeConfig:
with open(v) as f1, open(other.__dict__[k]) as f2:
if f1.read() != f2.read():
return
except IOError:
except OSError:
# fall back to only compare filenames in case we are
# testing the passing of filenames to the config
if other.__dict__[k] != v:
@ -393,7 +393,7 @@ class FakeConfig:
try:
with open(v) as f:
val = "FILE: %s" % str.decode(f.read())
except IOError as e:
except OSError as e:
val = "ERROR: %s" % str(e)
rep += "\t%s: %s\n" % (k, val)
return "Config(%s\n)" % rep