From e7ba25d802c19c659f33b7a9d819d860de35377c Mon Sep 17 00:00:00 2001 From: Mathias Rav Date: Fri, 1 May 2015 16:59:07 +0200 Subject: [PATCH] FileExistsError is not in Python 2 --- emailtunnel/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emailtunnel/__init__.py b/emailtunnel/__init__.py index 8802472..fd88278 100644 --- a/emailtunnel/__init__.py +++ b/emailtunnel/__init__.py @@ -107,7 +107,7 @@ def _sanity_log_invalid(self, message): basename = os.path.join(dirname, now_string()) try: os.mkdir(dirname) - except FileExistsError: + except OSError: pass with open(basename + '.in', 'ab') as fp: fp.write(message)