From 2e5ad99022b9107631c42f976fb5488ca295f7c0 Mon Sep 17 00:00:00 2001 From: camelid Date: Sun, 31 May 2020 09:20:08 -0700 Subject: [PATCH] Use binary strings for compatibility with Python 3 --- python/servo/command_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 43bd0e4c411..db9f550e61d 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -741,10 +741,10 @@ install them, let us know by filing a bug!") git_sha = None # Check if it's a bundle commit - if git_commit_subject.startswith("Shallow version of commit "): + if git_commit_subject.startswith(b"Shallow version of commit "): # This is a bundle commit # Get the SHA-1 from the bundle subject: "Shallow version of commit {sha1}" - git_sha = git_commit_subject.split(' ')[-1].strip() + git_sha = git_commit_subject.split(b' ')[-1].strip() # Shorten hash # NOTE: Partially verifies the hash, but it will still pass if it's, e.g., a tree git_sha = subprocess.check_output([