mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
parent
6a7a49c631
commit
8b33dd8e54
21 changed files with 56 additions and 56 deletions
|
@ -39,11 +39,11 @@ def process(filename, tabsize, verbose=True):
|
|||
backup = filename + "~"
|
||||
try:
|
||||
os.unlink(backup)
|
||||
except os.error:
|
||||
except OSError:
|
||||
pass
|
||||
try:
|
||||
os.rename(filename, backup)
|
||||
except os.error:
|
||||
except OSError:
|
||||
pass
|
||||
with open(filename, "w", encoding=encoding) as f:
|
||||
f.write(newtext)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue