Skip to content

Commit fdf0da5

Browse files
committed
makeqstrdata: print error to stderr.
1 parent 6fc765c commit fdf0da5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

py/makeqstrdata.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import argparse
22
import re
3+
import sys
34

45
# codepoint2name is different in Python 2 to Python 3
56
import platform
@@ -37,7 +38,7 @@ def do_work(infiles):
3738
# verify line is of the correct form
3839
match = re.match(r'Q\((.+)\)$', line)
3940
if not match:
40-
print('({}:{}) bad qstr format, got {}'.format(infile, line_number, line))
41+
print('({}:{}) bad qstr format, got {}'.format(infile, line_number, line), file=sys.stderr)
4142
return False
4243

4344
# get the qstr value
@@ -68,7 +69,7 @@ def main():
6869

6970
result = do_work(args.files)
7071
if not result:
71-
print('exiting with error code')
72+
print('exiting with error code', file=sys.stderr)
7273
exit(1)
7374

7475
if __name__ == "__main__":

0 commit comments

Comments
 (0)