]> git.lizzy.rs Git - rust.git/commitdiff
etc: py3 compat for tidy.py
authorRicho Healey <richo@psych0tik.net>
Sun, 24 May 2015 12:34:29 +0000 (05:34 -0700)
committerRicho Healey <richo@psych0tik.net>
Sun, 24 May 2015 12:42:10 +0000 (05:42 -0700)
src/etc/tidy.py

index c524fae7f0a42e6272ce736cd5d54517702baa11..9f5f919bce8d8c1c315a17b73038cac87f58cf4f 100644 (file)
@@ -81,7 +81,7 @@ check_cr = True
 check_linelength = True
 
 if len(sys.argv) < 2:
-    print "usage: tidy.py <src-dir>"
+    print("usage: tidy.py <src-dir>")
     sys.exit(1)
 
 src_dir = sys.argv[1]
@@ -200,10 +200,10 @@ except UnicodeDecodeError as e:
 
 print
 for ext in sorted(file_counts, key=file_counts.get, reverse=True):
-    print "* linted {} {} files".format(file_counts[ext], ext)
-print "* linted {} other files".format(count_other_linted_files)
-print "* total lines of code: {}".format(count_lines)
-print "* total non-blank lines of code: {}".format(count_non_blank_lines)
-print
+    print("* linted {} {} files".format(file_counts[ext], ext))
+print("* linted {} other files".format(count_other_linted_files))
+print("* total lines of code: {}".format(count_lines))
+print("* total non-blank lines of code: {}".format(count_non_blank_lines))
+print()
 
 sys.exit(err)