Merge pull request #1 from cabrera/py3k_url_fix

fix: url includes bytes in python 3
This commit is contained in:
Doug Hellmann 2013-09-12 15:48:55 -07:00
commit 068e0e6e07
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: