aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGraham Krizek <graham@krizek.io>2019-01-18 09:36:39 -0600
committerGraham Krizek <graham@krizek.io>2019-01-18 09:36:39 -0600
commitfdf82ba1813cf12e2794bbe20f7d002eaf4279fc (patch)
treef9adec0c2023d05c2aef6e56790ffc4ecf3acb45 /test
parentfcb6694a9945d2a02f40587e18bd395ef64048e0 (diff)
downloadbitcoin-fdf82ba1813cf12e2794bbe20f7d002eaf4279fc.tar.xz
Update all subprocess.check_output functions in CI scripts to be Python 3.4 compatible
Removing the 'universal_newlines' and 'encoding' args from the subprocess.check_outputs fuction. 'universal_newlines' is supported in 3.4, but 'encoding' is not. Without specifying 'encoding' it will make a guess at encoding, which can break things on BSD systems. We must handle encoding/decoding ourselves until we can use Python 3.6
Diffstat (limited to 'test')
-rwxr-xr-xtest/lint/check-doc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lint/check-doc.py b/test/lint/check-doc.py
index 4facd6c334..c370ce0c04 100755
--- a/test/lint/check-doc.py
+++ b/test/lint/check-doc.py
@@ -30,8 +30,8 @@ def main():
used = check_output(CMD_GREP_ARGS, shell=True, universal_newlines=True, encoding='utf8')
docd = check_output(CMD_GREP_DOCS, shell=True, universal_newlines=True, encoding='utf8')
else:
- used = check_output(CMD_GREP_ARGS, shell=True, universal_newlines=True) # encoding='utf8'
- docd = check_output(CMD_GREP_DOCS, shell=True, universal_newlines=True) # encoding='utf8'
+ used = check_output(CMD_GREP_ARGS, shell=True).decode('utf8').strip()
+ docd = check_output(CMD_GREP_DOCS, shell=True).decode('utf8').strip()
args_used = set(re.findall(re.compile(REGEX_ARG), used))
args_docd = set(re.findall(re.compile(REGEX_DOC), docd)).union(SET_DOC_OPTIONAL)