Skip to content

Commit

Permalink
update git ref to explicitly return string (fix py3 bytes error)
Browse files Browse the repository at this point in the history
  • Loading branch information
troyready committed Aug 28, 2018
1 parent 6f2cc37 commit 00b3ffe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stacker/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def test_SourceProcessor_helpers(self):
GitPackageSource({'uri': 'https://github.com/remind101/'
'stacker.git',
'branch': 'release-1.0'})),
b'857b4834980e582874d70feef77bb064b60762d1'
'857b4834980e582874d70feef77bb064b60762d1'
)
self.assertEqual(
sp.determine_git_ref(
Expand Down
2 changes: 2 additions & 0 deletions stacker/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,8 @@ def determine_git_ref(self, config):
config['uri'],
self.determine_git_ls_remote_ref(config)
)
if sys.version_info[0] > 2 and isinstance(ref, bytes):
return ref.decode()
return ref

def sanitize_uri_path(self, uri):
Expand Down

0 comments on commit 00b3ffe

Please sign in to comment.