lfs: add some bytestring wrappers in blobstore.py
authorAugie Fackler <augie@google.com>
Fri, 02 Mar 2018 11:06:37 -0500
changeset 36601 4da09b46451e
parent 36600 95bd9e396774
child 36602 e30be4d2ac60
lfs: add some bytestring wrappers in blobstore.py Differential Revision: https://phab.mercurial-scm.org/D2565
hgext/lfs/blobstore.py
--- 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)