Mercurial > hg-stable
changeset 37468:ef661ce45cdb
py3: use system string to access email headers
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 08 Apr 2018 15:03:00 +0900 |
parents | 9bf65d1b43a6 |
children | 7edf68862fe3 |
files | mercurial/patch.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/patch.py Sun Apr 08 14:59:12 2018 +0900 +++ b/mercurial/patch.py Sun Apr 08 15:03:00 2018 +0900 @@ -224,8 +224,8 @@ try: msg = pycompat.emailparser().parse(fileobj) - subject = msg['Subject'] and mail.headdecode(msg['Subject']) - data['user'] = msg['From'] and mail.headdecode(msg['From']) + subject = msg[r'Subject'] and mail.headdecode(msg[r'Subject']) + data['user'] = msg[r'From'] and mail.headdecode(msg[r'From']) if not subject and not data['user']: # Not an email, restore parsed headers if any subject = '\n'.join(': '.join(map(encoding.strtolocal, h))