##// END OF EJS Templates
patchbomb: ensure all headers and values given to email mod are native strings...
Augie Fackler -
r38799:65ed2fcb default
parent child Browse files
Show More
@@ -780,6 +780,16 b' def email(ui, repo, *revs, **opts):'
780 780 m['Bcc'] = ', '.join(bcc)
781 781 if replyto:
782 782 m['Reply-To'] = ', '.join(replyto)
783 # Fix up all headers to be native strings.
784 # TODO(durin42): this should probably be cleaned up above in the future.
785 if pycompat.ispy3:
786 for hdr, val in list(m.items()):
787 if isinstance(hdr, bytes):
788 del m[hdr]
789 hdr = pycompat.strurl(hdr)
790 if isinstance(val, bytes):
791 val = pycompat.strurl(val)
792 m[hdr] = val
783 793 if opts.get('test'):
784 794 ui.status(_('displaying '), subj, ' ...\n')
785 795 ui.pager('email')
General Comments 0
You need to be logged in to leave comments. Login now