notify: just use email.errors
authorYuya Nishihara <yuya@tcha.org>
Sun, 14 Oct 2018 13:35:47 +0200
changeset 40290 091f9b8a1051
parent 40289 7d3285f799cc
child 40291 170926caf44c
notify: just use email.errors email.Errors is a proxy object to email.errors on Python 2.
hgext/notify.py
--- a/hgext/notify.py	Sat Oct 06 21:13:59 2018 +0900
+++ b/hgext/notify.py	Sun Oct 14 13:35:47 2018 +0200
@@ -141,7 +141,7 @@
 '''
 from __future__ import absolute_import
 
-import email
+import email.errors as emailerrors
 import email.parser as emailparser
 import fnmatch
 import socket
@@ -153,7 +153,6 @@
     logcmdutil,
     mail,
     patch,
-    pycompat,
     registrar,
     util,
 )
@@ -162,11 +161,6 @@
     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