diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-06-12 17:49:20 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2018-06-12 21:34:52 +0200 |
commit | 634bd970013eca90f4b4c1f9044eec8c97ba62c2 (patch) | |
tree | cf308babc695722ab55344bcd27b1b68802ce3f9 /contrib/verify-commits/verify-commits.py | |
parent | fa4b9065a8298f546d91fe382b4517fbf30749c1 (diff) |
Explicitly specify encoding when opening text files in Python code
Diffstat (limited to 'contrib/verify-commits/verify-commits.py')
-rwxr-xr-x | contrib/verify-commits/verify-commits.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/verify-commits/verify-commits.py b/contrib/verify-commits/verify-commits.py index 80f0aa0bf1..a9e4977715 100755 --- a/contrib/verify-commits/verify-commits.py +++ b/contrib/verify-commits/verify-commits.py @@ -76,11 +76,11 @@ def main(): # get directory of this program and read data files dirname = os.path.dirname(os.path.abspath(__file__)) print("Using verify-commits data from " + dirname) - verified_root = open(dirname + "/trusted-git-root", "r").read().splitlines()[0] - verified_sha512_root = open(dirname + "/trusted-sha512-root-commit", "r").read().splitlines()[0] - revsig_allowed = open(dirname + "/allow-revsig-commits", "r").read().splitlines() - unclean_merge_allowed = open(dirname + "/allow-unclean-merge-commits", "r").read().splitlines() - incorrect_sha512_allowed = open(dirname + "/allow-incorrect-sha512-commits", "r").read().splitlines() + verified_root = open(dirname + "/trusted-git-root", "r", encoding="utf8").read().splitlines()[0] + verified_sha512_root = open(dirname + "/trusted-sha512-root-commit", "r", encoding="utf8").read().splitlines()[0] + revsig_allowed = open(dirname + "/allow-revsig-commits", "r", encoding="utf-8").read().splitlines() + unclean_merge_allowed = open(dirname + "/allow-unclean-merge-commits", "r", encoding="utf-8").read().splitlines() + incorrect_sha512_allowed = open(dirname + "/allow-incorrect-sha512-commits", "r", encoding="utf-8").read().splitlines() # Set commit and branch and set variables current_commit = args.commit |