Patchwork D3835: patchbomb: use email.mime.multipart instead of email.MIMEMultipart

login
register
mail settings
Submitter phabricator
Date June 26, 2018, 12:10 p.m.
Message ID <8d83a7d22e6f83458fdeed705ed92e5f@localhost.localdomain>
Download mbox | patch
Permalink /patch/32437/
State Not Applicable
Headers show

Comments

phabricator - June 26, 2018, 12:10 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG91228d9ae7c8: patchbomb: use email.mime.multipart instead of email.MIMEMultipart (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3835?vs=9295&id=9304

REVISION DETAIL
  https://phab.mercurial-scm.org/D3835

AFFECTED FILES
  hgext/patchbomb.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -75,6 +75,7 @@ 
 
 import email as emailmod
 import email.generator as emailgen
+import email.mime.multipart as emimemultipart
 import email.utils as eutil
 import errno
 import os
@@ -254,7 +255,7 @@ 
         body += '\n'.join(patchlines)
 
     if addattachment:
-        msg = emailmod.MIMEMultipart.MIMEMultipart()
+        msg = emimemultipart.MIMEMultipart()
         if body:
             msg.attach(mail.mimeencode(ui, body, _charsets, opts.get('test')))
         p = mail.mimetextpatch('\n'.join(patchlines), 'x-patch',
@@ -365,7 +366,7 @@ 
             or prompt(ui, 'Subject:', 'A bundle for your repository'))
 
     body = _getdescription(repo, '', sender, **opts)
-    msg = emailmod.MIMEMultipart.MIMEMultipart()
+    msg = emimemultipart.MIMEMultipart()
     if body:
         msg.attach(mail.mimeencode(ui, body, _charsets, opts.get(r'test')))
     datapart = emailmod.MIMEBase.MIMEBase('application', 'x-mercurial-bundle')