mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
make lib2to3/main.py syntax py3k valid
This commit is contained in:
parent
fb1a5eb101
commit
c0a40ab623
1 changed files with 5 additions and 5 deletions
|
@ -39,19 +39,19 @@ def main(fixer_pkg, args=None):
|
||||||
refactor_stdin = False
|
refactor_stdin = False
|
||||||
options, args = parser.parse_args(args)
|
options, args = parser.parse_args(args)
|
||||||
if options.list_fixes:
|
if options.list_fixes:
|
||||||
print "Available transformations for the -f/--fix option:"
|
print("Available transformations for the -f/--fix option:")
|
||||||
for fixname in refactor.get_all_fix_names(fixer_pkg):
|
for fixname in refactor.get_all_fix_names(fixer_pkg):
|
||||||
print fixname
|
print(fixname)
|
||||||
if not args:
|
if not args:
|
||||||
return 0
|
return 0
|
||||||
if not args:
|
if not args:
|
||||||
print >>sys.stderr, "At least one file or directory argument required."
|
print("At least one file or directory argument required.", file=sys.stderr)
|
||||||
print >>sys.stderr, "Use --help to show usage."
|
print("Use --help to show usage.", file=sys.stderr)
|
||||||
return 2
|
return 2
|
||||||
if "-" in args:
|
if "-" in args:
|
||||||
refactor_stdin = True
|
refactor_stdin = True
|
||||||
if options.write:
|
if options.write:
|
||||||
print >>sys.stderr, "Can't write to stdin."
|
print("Can't write to stdin.", file=sys.stderr)
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
# Set up logging handler
|
# Set up logging handler
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue