Patchwork D2136: py3: convert content-type to bytes

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 1:39 a.m.
Message ID <16c60ace8dabf6b68910a1f8e81e13f7@localhost.localdomain>
Download mbox | patch
Permalink /patch/27605/
State Not Applicable
Headers show

Comments

phabricator - Feb. 12, 2018, 1:39 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG95791b275b73: py3: convert content-type to bytes (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2136?vs=5421&id=5437

REVISION DETAIL
  https://phab.mercurial-scm.org/D2136

AFFECTED FILES
  mercurial/patch.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -242,7 +242,7 @@ 
         ok_types = ('text/plain', 'text/x-diff', 'text/x-patch')
         message = ''
         for part in msg.walk():
-            content_type = part.get_content_type()
+            content_type = pycompat.bytestr(part.get_content_type())
             ui.debug('Content-Type: %s\n' % content_type)
             if content_type not in ok_types:
                 continue