py3: use util.forcebytestr to convert str to bytes
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 28 Feb 2018 19:55:25 +0530
changeset 36488 724ddf2444a7
parent 36487 dabf86721200
child 36489 4b9e9e3f450c
py3: use util.forcebytestr to convert str to bytes Differential Revision: https://phab.mercurial-scm.org/D2498
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