hgext/lfs/blobstore.py
changeset 50928 d718eddf01d9
parent 50901 6543469a351e
child 50929 18c8c18993f0
equal deleted inserted replaced
50927:7a8ea1397816 50928:d718eddf01d9
   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, 'reason'):
   274     if hasattr(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, '_subtoppath'):
   754         elif hasattr(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: