Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: tools/pretty_gyp.py

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/pretty_gyp.py
diff --git a/tools/pretty_gyp.py b/tools/pretty_gyp.py
index d5736bbd4a60099c14e21d792b4b9de9969a3b5b..5060d1d9e29decda76c60699a8581d60c5ae0f5c 100755
--- a/tools/pretty_gyp.py
+++ b/tools/pretty_gyp.py
@@ -6,6 +6,8 @@
"""Pretty-prints the contents of a GYP file."""
+from __future__ import print_function
+
import sys
import re
@@ -125,15 +127,15 @@ def prettyprint_input(lines):
(brace_diff, after) = count_braces(line)
if brace_diff != 0:
if after:
- print " " * (basic_offset * indent) + line
+ print(" " * (basic_offset * indent) + line)
indent += brace_diff
else:
indent += brace_diff
- print " " * (basic_offset * indent) + line
+ print(" " * (basic_offset * indent) + line)
else:
- print " " * (basic_offset * indent) + line
+ print(" " * (basic_offset * indent) + line)
else:
- print ""
+ print("")
last_line = line

Powered by Google App Engine
This is Rietveld 408576698