Skip to content

Commit

Permalink
tooling: Fix update sources script for Python 3
Browse files Browse the repository at this point in the history
This one small change allows the update_glslang_sources.py script to operate correctly with Python 2 and Python 3.

Change the string literal type to "bytes" so that it matches the type returned by the subprocess calls.  Otherwise, under Python 3, the search for "known-good" in the list of remotes always fails.  This is OK for the first execution of update_glsang_sources, since the remote is not there on the first run.  But on subsequent runs, the search still fails to match and the script stops when trying to create a remote that already exists.
  • Loading branch information
karl-lunarg authored Aug 27, 2018
1 parent 1323bf8 commit 0cb8ad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion update_glslang_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def GetUrl(self):
def AddRemote(self):
"""Add the remote 'known-good' if it does not exist."""
remotes = command_output(['git', 'remote'], self.subdir).splitlines()
if 'known-good' not in remotes:
if b'known-good' not in remotes:
command_output(['git', 'remote', 'add', 'known-good', self.GetUrl()], self.subdir)

def HasCommit(self):
Expand Down

0 comments on commit 0cb8ad5

Please sign in to comment.