Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
fdf0da54
Commit
fdf0da54
authored
Mar 08, 2014
by
Damien George
Browse files
makeqstrdata: print error to stderr.
parent
6fc765c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/makeqstrdata.py
View file @
fdf0da54
import
argparse
import
re
import
sys
# codepoint2name is different in Python 2 to Python 3
import
platform
...
...
@@ -37,7 +38,7 @@ def do_work(infiles):
# verify line is of the correct form
match
=
re
.
match
(
r
'Q\((.+)\)$'
,
line
)
if
not
match
:
print
(
'({}:{}) bad qstr format, got {}'
.
format
(
infile
,
line_number
,
line
))
print
(
'({}:{}) bad qstr format, got {}'
.
format
(
infile
,
line_number
,
line
)
,
file
=
sys
.
stderr
)
return
False
# get the qstr value
...
...
@@ -68,7 +69,7 @@ def main():
result
=
do_work
(
args
.
files
)
if
not
result
:
print
(
'exiting with error code'
)
print
(
'exiting with error code'
,
file
=
sys
.
stderr
)
exit
(
1
)
if
__name__
==
"__main__"
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment