mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
scripted-diff: Use new python 3.7 keywords
-BEGIN VERIFY SCRIPT- sed -i 's/universal_newlines/text/g' $(git grep -l universal_newlines) -END VERIFY SCRIPT-
This commit is contained in:
@@ -80,7 +80,7 @@ def get_diff(commit_range, check_only_code):
|
||||
else:
|
||||
what_files = ["."]
|
||||
|
||||
diff = check_output(["git", "diff", "-U0", commit_range, "--"] + what_files + exclude_args, universal_newlines=True, encoding="utf8")
|
||||
diff = check_output(["git", "diff", "-U0", commit_range, "--"] + what_files + exclude_args, text=True, encoding="utf8")
|
||||
|
||||
return diff
|
||||
|
||||
@@ -93,7 +93,7 @@ def main():
|
||||
commit_range = "HEAD~" + args.prev_commits + "...HEAD"
|
||||
else:
|
||||
# This assumes that the target branch of the pull request will be master.
|
||||
merge_base = check_output(["git", "merge-base", "HEAD", "master"], universal_newlines=True, encoding="utf8").rstrip("\n")
|
||||
merge_base = check_output(["git", "merge-base", "HEAD", "master"], text=True, encoding="utf8").rstrip("\n")
|
||||
commit_range = merge_base + "..HEAD"
|
||||
else:
|
||||
commit_range = os.getenv("COMMIT_RANGE")
|
||||
|
Reference in New Issue
Block a user