mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-08 19:53:27 +01:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user