hgext/lfs/blobstore.py
changeset 50898 6543469a351e
parent 49585 18282cf18aa2
child 50925 d718eddf01d9
equal deleted inserted replaced
50897:a99e62dae4c8 50898:6543469a351e
   269     inst = urlerror
   269     inst = urlerror
   270 
   270 
   271     if isinstance(urlerror.reason, Exception):
   271     if isinstance(urlerror.reason, Exception):
   272         inst = urlerror.reason
   272         inst = urlerror.reason
   273 
   273 
   274     if util.safehasattr(inst, b'reason'):
   274     if util.safehasattr(inst, 'reason'):
   275         try:  # usually it is in the form (errno, strerror)
   275         try:  # usually it is in the form (errno, strerror)
   276             reason = inst.reason.args[1]
   276             reason = inst.reason.args[1]
   277         except (AttributeError, IndexError):
   277         except (AttributeError, IndexError):
   278             # it might be anything, for example a string
   278             # it might be anything, for example a string
   279             reason = inst.reason
   279             reason = inst.reason
   749     lfsurl = repo.ui.config(b'lfs', b'url')
   749     lfsurl = repo.ui.config(b'lfs', b'url')
   750     url = urlutil.url(lfsurl or b'')
   750     url = urlutil.url(lfsurl or b'')
   751     if lfsurl is None:
   751     if lfsurl is None:
   752         if remote:
   752         if remote:
   753             path = remote
   753             path = remote
   754         elif util.safehasattr(repo, b'_subtoppath'):
   754         elif util.safehasattr(repo, '_subtoppath'):
   755             # The pull command sets this during the optional update phase, which
   755             # The pull command sets this during the optional update phase, which
   756             # tells exactly where the pull originated, whether 'paths.default'
   756             # tells exactly where the pull originated, whether 'paths.default'
   757             # or explicit.
   757             # or explicit.
   758             path = repo._subtoppath
   758             path = repo._subtoppath
   759         else:
   759         else: