changeset 36630:4da09b46451e

lfs: add some bytestring wrappers in blobstore.py Differential Revision: https://phab.mercurial-scm.org/D2565
author Augie Fackler <augie@google.com>
date Fri, 02 Mar 2018 11:06:37 -0500
parents 95bd9e396774
children e30be4d2ac60
files hgext/lfs/blobstore.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)