From ab348387b51fbdf7dd363614d8dae354cc012fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 7 Dec 2011 17:05:24 +0100 Subject: [PATCH] extracttests.py: python 3 compatibility updates --- tools/extracttests.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/extracttests.py b/tools/extracttests.py index ee0a24bff..3ddeba76c 100755 --- a/tools/extracttests.py +++ b/tools/extracttests.py @@ -135,8 +135,8 @@ def writeHtmlFile(nodes, functionName, filename, errorsOnly): if len(sys.argv) <= 1 or '--help' in sys.argv: - print 'Extract test cases from test file' - print 'Syntax: extracttests.py [--html=folder] [--xml] [--code=folder] path/testfile.cpp' + print('Extract test cases from test file') + print('Syntax: extracttests.py [--html=folder] [--xml] [--code=folder] path/testfile.cpp') sys.exit(0) # parse command line @@ -154,7 +154,7 @@ for arg in sys.argv[1:]: elif arg.endswith('.cpp'): filename = arg else: - print 'Invalid option: ' + arg + print('Invalid option: ' + arg) sys.exit(1) @@ -166,8 +166,8 @@ if filename != None: # generate output if xml: - print '' - print '' + print('') + print('') count = 0 for node in e.nodes: s = ' ' + print(s) + print('') elif htmldir != None: if not htmldir.endswith('/'): htmldir += '/' @@ -277,5 +277,5 @@ if filename != None: errors.close() else: for node in e.nodes: - print node['functionName'] + print(node['functionName'])