mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +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
|
@ -90,11 +90,11 @@ class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool):
|
|||
if os.path.lexists(backup):
|
||||
try:
|
||||
os.remove(backup)
|
||||
except os.error as err:
|
||||
except OSError as err:
|
||||
self.log_message("Can't remove backup %s", backup)
|
||||
try:
|
||||
os.rename(filename, backup)
|
||||
except os.error as err:
|
||||
except OSError as err:
|
||||
self.log_message("Can't rename %s to %s", filename, backup)
|
||||
# Actually write the new file
|
||||
write = super(StdoutRefactoringTool, self).write_file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue