mercurial/mail.py
changeset 29192 bac14dbbbfab
parent 28935 a4c5c23de1d3
child 29227 dffe78d80a6c
--- a/mercurial/mail.py	Wed May 11 14:18:52 2016 -0700
+++ b/mercurial/mail.py	Tue May 17 05:32:36 2016 +0530
@@ -41,7 +41,7 @@
     kw['continuation_ws'] = ' '
     _oldheaderinit(self, *args, **kw)
 
-email.Header.Header.__dict__['__init__'] = _unifiedheaderinit
+setattr(email.header.Header, '__init__', _unifiedheaderinit)
 
 class STARTTLS(smtplib.SMTP):
     '''Derived class to verify the peer certificate for STARTTLS.