Patchwork D3836: patchbomb: use email.mime.base instead of email.MIMEBase

login
register
mail settings
Submitter phabricator
Date June 26, 2018, 12:10 p.m.
Message ID <7bbdc77868a14790818d1a16a956a129@localhost.localdomain>
Download mbox | patch
Permalink /patch/32438/
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 rHGd17d1ee1d602: patchbomb: use email.mime.base instead of email.MIMEBase (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3836?vs=9296&id=9305

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

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.base as emimebase
 import email.mime.multipart as emimemultipart
 import email.utils as eutil
 import errno
@@ -369,7 +370,7 @@ 
     msg = emimemultipart.MIMEMultipart()
     if body:
         msg.attach(mail.mimeencode(ui, body, _charsets, opts.get(r'test')))
-    datapart = emailmod.MIMEBase.MIMEBase('application', 'x-mercurial-bundle')
+    datapart = emimebase.MIMEBase('application', 'x-mercurial-bundle')
     datapart.set_payload(bundle)
     bundlename = '%s.hg' % opts.get(r'bundlename', 'bundle')
     datapart.add_header('Content-Disposition', 'attachment',