lfs: add some bytestring wrappers in blobstore.py
Differential Revision: https://phab.mercurial-scm.org/D2565
--- a/hgext/lfs/blobstore.py Fri Mar 02 11:05:53 2018 -0500
+++ b/hgext/lfs/blobstore.py Fri Mar 02 11:06:37 2018 -0500
@@ -18,6 +18,7 @@
from mercurial import (
error,
pathutil,
+ pycompat,
url as urlmod,
util,
vfs as vfsmod,
@@ -281,9 +282,9 @@
See https://github.com/git-lfs/git-lfs/blob/master/docs/api/\
basic-transfers.md
"""
- oid = str(obj['oid'])
+ oid = pycompat.bytestr(obj['oid'])
- href = str(obj['actions'][action].get('href'))
+ href = pycompat.bytestr(obj['actions'][action].get('href'))
headers = obj['actions'][action].get('header', {}).items()
request = util.urlreq.request(href)