D4222: patchbomb: use email.encoders instead of email.Encoders
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Aug 9 22:33:50 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
No idea when this became a thing, but it exists for me in both 2.7 and 3.6.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4222
AFFECTED FILES
hgext/patchbomb.py
CHANGE DETAILS
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -73,7 +73,7 @@
'''
from __future__ import absolute_import
-import email as emailmod
+import email.encoders as emailencoders
import email.generator as emailgen
import email.mime.base as emimebase
import email.mime.multipart as emimemultipart
@@ -380,7 +380,7 @@
bundlename = '%s.hg' % opts.get(r'bundlename', 'bundle')
datapart.add_header('Content-Disposition', 'attachment',
filename=bundlename)
- emailmod.Encoders.encode_base64(datapart)
+ emailencoders.encode_base64(datapart)
msg.attach(datapart)
msg['Subject'] = mail.headencode(ui, subj, _charsets, opts.get(r'test'))
return [(msg, subj, None)]
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list