Rigth comparison with err EEXIST

This is the right code. The OSError doesn't have the EEXIST variable.
This commit is contained in:
Rodolfo García Peñas (kix) 2020-10-12 01:35:20 +02:00
parent 3d5f926552
commit 62df6e70c3

View File

@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
import errno
import socket
import time
import re
@ -311,7 +312,7 @@ class MaildirFolder(BaseFolder):
except OSError as e:
if not hasattr(e, 'EEXIST'):
raise
if e.errno == e.EEXIST:
if e.errno == errno.EEXIST:
if tries:
time.sleep(0.23)
continue