Mercurial > public > mercurial-scm > hg
comparison mercurial/patch.py @ 51792:8f629783b8ae stable
import: fix erroneous comparison of str with bytes
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Fri, 09 Aug 2024 14:26:13 +0200 |
parents | d718eddf01d9 |
children | 454feddab720 |
comparison
equal
deleted
inserted
replaced
51791:73476a9e5ced | 51792:8f629783b8ae |
---|---|
120 | 120 |
121 m = mail.parse(c) | 121 m = mail.parse(c) |
122 if not m.is_multipart(): | 122 if not m.is_multipart(): |
123 yield msgfp(m) | 123 yield msgfp(m) |
124 else: | 124 else: |
125 ok_types = (b'text/plain', b'text/x-diff', b'text/x-patch') | 125 ok_types = ('text/plain', 'text/x-diff', 'text/x-patch') |
126 for part in m.walk(): | 126 for part in m.walk(): |
127 ct = part.get_content_type() | 127 ct = part.get_content_type() |
128 if ct not in ok_types: | 128 if ct not in ok_types: |
129 continue | 129 continue |
130 yield msgfp(part) | 130 yield msgfp(part) |