##// END OF EJS Templates
notify: adapt to new location of email module's errors...
Augie Fackler -
r40320:46b55f27 default
parent child Browse files
Show More
@@ -153,6 +153,7 b' from mercurial import ('
153 logcmdutil,
153 logcmdutil,
154 mail,
154 mail,
155 patch,
155 patch,
156 pycompat,
156 registrar,
157 registrar,
157 util,
158 util,
158 )
159 )
@@ -161,6 +162,11 b' from mercurial.utils import ('
161 stringutil,
162 stringutil,
162 )
163 )
163
164
165 if pycompat.ispy3:
166 import email.errors as emailerrors
167 else:
168 emailerrors = email.Errors
169
164 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
170 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
165 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
171 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
166 # be specifying the version(s) of Mercurial they are tested with, or
172 # be specifying the version(s) of Mercurial they are tested with, or
@@ -362,7 +368,7 b' class notifier(object):'
362 p = emailparser.Parser()
368 p = emailparser.Parser()
363 try:
369 try:
364 msg = p.parsestr(data)
370 msg = p.parsestr(data)
365 except email.Errors.MessageParseError as inst:
371 except emailerrors.MessageParseError as inst:
366 raise error.Abort(inst)
372 raise error.Abort(inst)
367
373
368 # store sender and subject
374 # store sender and subject
General Comments 0
You need to be logged in to leave comments. Login now