From 2fe84a118865f06df89d02e6b733194d21639517 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 6 Aug 2013 22:23:47 +0200 Subject: Fix a crash for python < 3.3 --- src/logger.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/logger.py b/src/logger.py index aee7812f..dcd5c224 100644 --- a/src/logger.py +++ b/src/logger.py @@ -70,8 +70,9 @@ class Logger(object): return try: makedirs(log_dir) - except FileExistsError: - pass + except OSError as e: + if e.errno != 17: # file exists + log.error('Unable to create the log dir', exc_info=True) except: log.error('Unable to create the log dir', exc_info=True) return -- cgit v1.2.3