mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Replace IOError with OSError (#16715)
This commit is contained in:
parent
16bdd4120d
commit
f7a17b48d7
121 changed files with 381 additions and 386 deletions
|
@ -16,7 +16,7 @@ def showwarning(message, category, filename, lineno, file=None, line=None):
|
|||
file = sys.stderr
|
||||
try:
|
||||
file.write(formatwarning(message, category, filename, lineno, line))
|
||||
except IOError:
|
||||
except OSError:
|
||||
pass # the file (probably stderr) is invalid - this warning gets lost.
|
||||
|
||||
def formatwarning(message, category, filename, lineno, line=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue