Issue #16706: get rid of os.error

This commit is contained in:
Andrew Svetlov 2012-12-18 22:02:39 +02:00
parent a191959849
commit ad28c7f9da
33 changed files with 4089 additions and 4123 deletions

View file

@ -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()