mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #16706: get rid of os.error
This commit is contained in:
parent
a191959849
commit
ad28c7f9da
33 changed files with 4089 additions and 4123 deletions
|
@ -534,12 +534,12 @@ class RefactoringTool(object):
|
|||
"""
|
||||
try:
|
||||
f = _open_with_encoding(filename, "w", encoding=encoding)
|
||||
except os.error as err:
|
||||
except OSError as err:
|
||||
self.log_error("Can't create %s: %s", filename, err)
|
||||
return
|
||||
try:
|
||||
f.write(_to_system_newlines(new_text))
|
||||
except os.error as err:
|
||||
except OSError as err:
|
||||
self.log_error("Can't write %s: %s", filename, err)
|
||||
finally:
|
||||
f.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue