diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Lib/lib2to3/main.py | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/lib2to3/main.py')
-rw-r--r-- | contrib/tools/python3/src/Lib/lib2to3/main.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/tools/python3/src/Lib/lib2to3/main.py b/contrib/tools/python3/src/Lib/lib2to3/main.py index 473ab6c841..f2849fd6be 100644 --- a/contrib/tools/python3/src/Lib/lib2to3/main.py +++ b/contrib/tools/python3/src/Lib/lib2to3/main.py @@ -90,11 +90,11 @@ class StdoutRefactoringTool(refactor.MultiprocessRefactoringTool): if os.path.lexists(backup): try: os.remove(backup) - except OSError: + except OSError: self.log_message("Can't remove backup %s", backup) try: os.rename(filename, backup) - except OSError: + except OSError: self.log_message("Can't rename %s to %s", filename, backup) # Actually write the new file write = super(StdoutRefactoringTool, self).write_file @@ -154,8 +154,8 @@ def main(fixer_pkg, args=None): help="List available transformations") parser.add_option("-p", "--print-function", action="store_true", help="Modify the grammar so that print() is a function") - parser.add_option("-e", "--exec-function", action="store_true", - help="Modify the grammar so that exec() is a function") + parser.add_option("-e", "--exec-function", action="store_true", + help="Modify the grammar so that exec() is a function") parser.add_option("-v", "--verbose", action="store_true", help="More verbose logging") parser.add_option("--no-diffs", action="store_true", @@ -213,9 +213,9 @@ def main(fixer_pkg, args=None): if options.print_function: flags["print_function"] = True - if options.exec_function: - flags["exec_function"] = True - + if options.exec_function: + flags["exec_function"] = True + # Set up logging handler level = logging.DEBUG if options.verbose else logging.INFO logging.basicConfig(format='%(name)s: %(message)s', level=level) |