mercurial/bundle2.py
changeset 34256 ab379eed2e31
parent 34228 8e0358024a36
child 34265 e71890f27767
--- a/mercurial/bundle2.py	Fri Sep 15 18:57:50 2017 +0200
+++ b/mercurial/bundle2.py	Fri Sep 15 18:37:29 2017 -0400
@@ -1050,7 +1050,11 @@
             header.append(key)
             header.append(value)
         ## finalize header
-        headerchunk = ''.join(header)
+        try:
+            headerchunk = ''.join(header)
+        except TypeError:
+            raise TypeError(r'Found a non-bytes trying to '
+                            r'build bundle part header: %r' % header)
         outdebug(ui, 'header chunk size: %i' % len(headerchunk))
         yield _pack(_fpartheadersize, len(headerchunk))
         yield headerchunk