Skip to content

Commit

Permalink
Fix python2 print
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 5, 2020
1 parent baf18a4 commit 52ef2a4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .ci/travis/scripts/ctest2travis.py
Expand Up @@ -83,7 +83,7 @@ def start_test_fold():
end_fold() # tag=build
start_test_fold()

if re.search('\*\*\*Failed', updated_line) or re.search('\*\*\*Timeout', updated_line):
if re.search('***Failed', updated_line) or re.search('***Timeout', updated_line):
end_fold()
updated_line = colored(updated_line, 'red')
in_failing_test = True
Expand All @@ -97,14 +97,14 @@ def start_test_fold():
in_failure = False
else:
updated_line = colored(updated_line, 'yellow')
elif re.search('\*\*\* Segmentation fault', updated_line):
elif re.search('*** Segmentation fault', updated_line):
start_fold('segfault')
updated_line = colored(updated_line, 'magenta')
elif re.match(' Test failed: Segmentation fault', updated_line):
end_fold()

else:
if re.match('(FAIL|ERROR)[:\!].*', updated_line):
if re.match('(FAIL|ERROR)[:!].*', updated_line):
updated_line = colored(updated_line, 'yellow')
in_failure = True

Expand Down
2 changes: 1 addition & 1 deletion scripts/context_help_id.py
Expand Up @@ -45,4 +45,4 @@
print(context_id)
else:
# if no class name was specified, give a bit of help
print "To generate a context sensitive help id, specify the QGIS class name on the command line"
print("To generate a context sensitive help id, specify the QGIS class name on the command line")
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsserver.py
Expand Up @@ -216,7 +216,7 @@ def _img_diff_error(self, response, headers, image, max_diff=100, max_size_diff=
with open(os.path.join(tempfile.gettempdir(), image + "_result." + extFile), "rb") as rendered_file:
encoded_rendered_file = base64.b64encode(rendered_file.read())
if not os.environ.get('ENCODED_OUTPUT'):
message = "Image is wrong\: rendered file %s/%s_result.%s" % (tempfile.gettempdir(), image, extFile)
message = "Image is wrong: rendered file %s/%s_result.%s" % (tempfile.gettempdir(), image, extFile)
else:
message = "Image is wrong\n%s\nImage:\necho '%s' | base64 -d >%s/%s_result.%s" % (
report, encoded_rendered_file.strip().decode('utf8'), tempfile.gettempdir(), image, extFile
Expand All @@ -226,7 +226,7 @@ def _img_diff_error(self, response, headers, image, max_diff=100, max_size_diff=
if os.path.exists(os.path.join(tempfile.gettempdir(), image + "_result_diff." + extFile)):
with open(os.path.join(tempfile.gettempdir(), image + "_result_diff." + extFile), "rb") as diff_file:
if not os.environ.get('ENCODED_OUTPUT'):
message = "Image is wrong\: diff file %s/%s_result_diff.%s" % (tempfile.gettempdir(), image, extFile)
message = "Image is wrong: diff file %s/%s_result_diff.%s" % (tempfile.gettempdir(), image, extFile)
else:
encoded_diff_file = base64.b64encode(diff_file.read())
message += "\nDiff:\necho '%s' | base64 -d > %s/%s_result_diff.%s" % (
Expand Down

0 comments on commit 52ef2a4

Please sign in to comment.