Skip to content
Snippets Groups Projects
Commit 27dbb255 authored by Dmitri Naumov's avatar Dmitri Naumov Committed by GitHub
Browse files

Merge pull request #1362 from chleh/fix-python23

Fix Jenkins python 2/3 compatibility
parents 91929e38 94d2ec6b
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ import os ...@@ -14,7 +14,7 @@ import os
import sys import sys
import xml.etree.cElementTree as ET import xml.etree.cElementTree as ET
import json import json
from six import print_ from print23 import print_
github_src_url = "https://github.com/ufz/ogs/tree/master" github_src_url = "https://github.com/ufz/ogs/tree/master"
github_data_url = "https://github.com/ufz/ogs-data/tree/master" github_data_url = "https://github.com/ufz/ogs-data/tree/master"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# This script actually generates the QA page. # This script actually generates the QA page.
# For its usage see generate-project-file-doc-qa.sh # For its usage see generate-project-file-doc-qa.sh
from six import print_ from print23 import print_
import sys import sys
import re import re
import os.path import os.path
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
from signal import signal, SIGPIPE, SIG_DFL from signal import signal, SIGPIPE, SIG_DFL
signal(SIGPIPE,SIG_DFL) signal(SIGPIPE,SIG_DFL)
from six import print_ from print23 import print_
import os import os
import sys import sys
import xml.etree.cElementTree as ET import xml.etree.cElementTree as ET
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
# and transforms it into a tabular representation for further # and transforms it into a tabular representation for further
# processing. # processing.
from print23 import print_
import sys import sys
import re import re
import os.path import os.path
...@@ -12,7 +13,7 @@ def debug(msg): ...@@ -12,7 +13,7 @@ def debug(msg):
sys.stderr.write(msg+"\n") sys.stderr.write(msg+"\n")
def write_out(*args): def write_out(*args):
print("@@@".join([str(a) for a in args])) print_("@@@".join(str(a) for a in args))
# capture #2 is the parameter path # capture #2 is the parameter path
comment = re.compile(r"//! \\ogs_file_(param|attr)\{([A-Za-z_0-9]+)\}( \\todo .*)?$") comment = re.compile(r"//! \\ogs_file_(param|attr)\{([A-Za-z_0-9]+)\}( \\todo .*)?$")
......
#!/usr/bin/python
# Print statement that behaves the same for python 2 and 3.
# E,g, print_(1.0, 2, "5") will always print the string "1.0 2 5".
def print_(*args):
print(" ".join(str(a) for a in args))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment