import: fix erroneous comparison of str with bytes stable
authorManuel Jacob <me@manueljacob.de>
Fri, 09 Aug 2024 14:26:13 +0200
branchstable
changeset 51796 8f629783b8ae
parent 51795 73476a9e5ced
child 51798 187d7c859be7
import: fix erroneous comparison of str with bytes
mercurial/patch.py
--- a/mercurial/patch.py	Thu Aug 08 17:28:38 2024 +0400
+++ b/mercurial/patch.py	Fri Aug 09 14:26:13 2024 +0200
@@ -122,7 +122,7 @@
         if not m.is_multipart():
             yield msgfp(m)
         else:
-            ok_types = (b'text/plain', b'text/x-diff', b'text/x-patch')
+            ok_types = ('text/plain', 'text/x-diff', 'text/x-patch')
             for part in m.walk():
                 ct = part.get_content_type()
                 if ct not in ok_types: