don't decode bytes to unicode twice

Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-10-03 13:02:48 -04:00
parent abebd9894a
commit 3077d6dca4

View File

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