This revision was automatically updated to reflect the committed changes. Closed by commit rHG46b55f279571: notify: adapt to new location of email module's errors (authored by durin42, committed by ).
REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5099?vs=12115&id=12119 REVISION DETAIL https://phab.mercurial-scm.org/D5099 AFFECTED FILES hgext/notify.py CHANGE DETAILS diff --git a/hgext/notify.py b/hgext/notify.py --- a/hgext/notify.py +++ b/hgext/notify.py @@ -153,14 +153,20 @@ logcmdutil, mail, patch, + pycompat, registrar, util, ) from mercurial.utils import ( dateutil, stringutil, ) +if pycompat.ispy3: + import email.errors as emailerrors +else: + emailerrors = email.Errors + # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should # be specifying the version(s) of Mercurial they are tested with, or @@ -362,7 +368,7 @@ p = emailparser.Parser() try: msg = p.parsestr(data) - except email.Errors.MessageParseError as inst: + except emailerrors.MessageParseError as inst: raise error.Abort(inst) # store sender and subject To: durin42, #hg-reviewers, pulkit Cc: mjpieters, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel