diff options
Diffstat (limited to 'Lib/lib2to3/refactor.py')
-rwxr-xr-x | Lib/lib2to3/refactor.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/lib2to3/refactor.py b/Lib/lib2to3/refactor.py index 31c80be..87b0c59 100755 --- a/Lib/lib2to3/refactor.py +++ b/Lib/lib2to3/refactor.py @@ -363,10 +363,9 @@ class RefactoringTool(object): self.log_error("Can't create %s: %s", filename, err) return try: - try: - f.write(new_text) - except os.error as err: - self.log_error("Can't write %s: %s", filename, err) + f.write(new_text) + except os.error as err: + self.log_error("Can't write %s: %s", filename, err) finally: f.close() self.log_debug("Wrote changes to %s", filename) |