comparison mercurial/exchange.py @ 32453:9d6031df42c8 stable

exchange: print full reason variable This commit essentially reverts 69ac9aebbc55. urllib2.URLError receives a "reason" argument. It isn't always a tuple. Mozilla has experienced at least IndexError failures due to the reason[1] access. https://bugzilla.mozilla.org/show_bug.cgi?id=1364687
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 24 May 2017 15:25:24 -0700
parents 291951ad070b
children 9929af2b09b4
comparison
equal deleted inserted replaced
32383:f928d53b687c 32453:9d6031df42c8
2016 tr.close() 2016 tr.close()
2017 return True 2017 return True
2018 except urlerr.httperror as e: 2018 except urlerr.httperror as e:
2019 ui.warn(_('HTTP error fetching bundle: %s\n') % str(e)) 2019 ui.warn(_('HTTP error fetching bundle: %s\n') % str(e))
2020 except urlerr.urlerror as e: 2020 except urlerr.urlerror as e:
2021 ui.warn(_('error fetching bundle: %s\n') % e.reason[1]) 2021 ui.warn(_('error fetching bundle: %s\n') % e.reason)
2022 2022
2023 return False 2023 return False
2024 finally: 2024 finally:
2025 tr.release() 2025 tr.release()
2026 finally: 2026 finally: