Skip to content

Commit 660f9c9

Browse files
committed
[gn build] Use print_function in write_cmake_config.py
No behavior change, just makes the script match the other scripts in llvm/utils/gn/build. Differential Revision: https://reviews.llvm.org/D55183 llvm-svn: 348190
1 parent 91f9c9c commit 660f9c9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/utils/gn/build/write_cmake_config.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
processing all values.
3333
"""
3434

35+
from __future__ import print_function
36+
3537
import argparse
3638
import os
3739
import re
@@ -82,15 +84,15 @@ def repl(m):
8284
out_lines.append(in_line)
8385

8486
if unused_values:
85-
print >>sys.stderr, 'Unused --values args:'
86-
print >>sys.stderr, ' ', '\n '.join(unused_values)
87+
print('unused values args:', file=sys.stderr)
88+
print(' ', '\n '.join(unused_values), file=sys.stderr)
8789
return 1
8890

8991
output = ''.join(out_lines)
9092

9193
leftovers = var_re.findall(output)
9294
if leftovers:
93-
print >>sys.stderr, 'unprocessed values:\n', '\n'.join(leftovers)
95+
print('unprocessed values:\n', '\n'.join(leftovers), file=sys.stderr)
9496
return 1
9597

9698
if not os.path.exists(args.output) or open(args.output).read() != output:

0 commit comments

Comments
 (0)