py3: use stringutil.forcebytestr() instead of str()
authorPulkit Goyal <7895pulkit@gmail.com>
Sat, 14 Apr 2018 01:59:55 +0530
changeset 37663 fc114a16a484
parent 37662 5340daa85c62
child 37664 483cafc3762a
py3: use stringutil.forcebytestr() instead of str() We need to convert errors to bytes using stringutil.forcebytestr() Differential Revision: https://phab.mercurial-scm.org/D3324
mercurial/exchange.py
--- a/mercurial/exchange.py	Sat Apr 14 01:58:44 2018 +0530
+++ b/mercurial/exchange.py	Sat Apr 14 01:59:55 2018 +0530
@@ -2291,7 +2291,7 @@
                     continue
 
             except error.InvalidBundleSpecification as e:
-                repo.ui.debug(str(e) + '\n')
+                repo.ui.debug(stringutil.forcebytestr(e) + '\n')
                 continue
             except error.UnsupportedBundleSpecification as e:
                 repo.ui.debug('filtering %s because unsupported bundle '