# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1519827925 -19800 # Node ID 724ddf2444a7d77137056ccf1c8bdc5e64d65b4c # Parent dabf8672120046e420f5daeb2f2b9be71457b607 py3: use util.forcebytestr to convert str to bytes Differential Revision: https://phab.mercurial-scm.org/D2498 diff -r dabf86721200 -r 724ddf2444a7 mercurial/exchange.py --- a/mercurial/exchange.py Sun Feb 25 11:00:53 2018 -0800 +++ b/mercurial/exchange.py Wed Feb 28 19:55:25 2018 +0530 @@ -2258,6 +2258,7 @@ ui.warn(_('HTTP error fetching bundle: %s\n') % util.forcebytestr(e)) except urlerr.urlerror as e: - ui.warn(_('error fetching bundle: %s\n') % e.reason) + ui.warn(_('error fetching bundle: %s\n') % + util.forcebytestr(e.reason)) return False