fix: url includes bytes in python 3

This patch decodes the ref_hash obtained from subprocess.check_output
so that strings are used to compose the URL rather than bytes.
This commit is contained in:
Alejandro Cabrera 2013-09-12 17:02:05 -04:00
parent ca79a901e0
commit 90dd5da24a
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ def main():
sys.stderr.write('Could not get hash for ref %r\n' % ref)
return 1
url = '%s/%s/%s/' % (args.base, ref_hash[:2], ref_hash)
ref_hash_str = ref_hash.decode('utf8')
url = '%s/%s/%s/' % (args.base, ref_hash_str[:2], ref_hash_str)
if args.url:
print(url)
else: