Patchwork D2454: py3: use email.generator module instead of email.Generator

login
register
mail settings
Submitter phabricator
Date Feb. 26, 2018, 1:12 p.m.
Message ID <94899d7a83092f9304b1516808ec8ce6@localhost.localdomain>
Download mbox | patch
Permalink /patch/28400/
State Not Applicable
Headers show

Comments

phabricator - Feb. 26, 2018, 1:12 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf449138a52df: py3: use email.generator module instead of email.Generator (authored by pulkit, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D2454?vs=6109&id=6125#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2454?vs=6109&id=6125

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

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
@@ -74,6 +74,7 @@ 
 from __future__ import absolute_import
 
 import email as emailmod
+import email.generator as emailgen
 import errno
 import os
 import socket
@@ -777,7 +778,7 @@ 
         if opts.get('test'):
             ui.status(_('displaying '), subj, ' ...\n')
             ui.pager('email')
-            generator = emailmod.Generator.Generator(ui, mangle_from_=False)
+            generator = emailgen.Generator(ui, mangle_from_=False)
             try:
                 generator.flatten(m, 0)
                 ui.write('\n')
@@ -794,7 +795,7 @@ 
                 # Exim does not remove the Bcc field
                 del m['Bcc']
             fp = stringio()
-            generator = emailmod.Generator.Generator(fp, mangle_from_=False)
+            generator = emailgen.Generator(fp, mangle_from_=False)
             generator.flatten(m, 0)
             sendmail(sender_addr, to + bcc + cc, fp.getvalue())