Skip to content

Commit b9b35fd

Browse files
committed
Fixed error message printing in write_cmake_config.py
Summary: Previously, write_cmake_config.py would raise an error while printing the error, because `leftovers` in "'\n'.join(leftovers)" is a tuple. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60766 llvm-svn: 358557
1 parent 5ca2e04 commit b9b35fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/utils/gn/build/write_cmake_config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ def repl(m):
9696

9797
leftovers = var_re.findall(output)
9898
if leftovers:
99-
print('unprocessed values:\n', '\n'.join(leftovers), file=sys.stderr)
99+
print(
100+
'unprocessed values:\n',
101+
'\n'.join([x[0] or x[1] for x in leftovers]),
102+
file=sys.stderr)
100103
return 1
101104

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

0 commit comments

Comments
 (0)