summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-08-06 22:23:47 +0200
committermathieui <mathieui@mathieui.net>2013-08-06 22:23:47 +0200
commit2fe84a118865f06df89d02e6b733194d21639517 (patch)
tree4541917dcdaab1234c68577b3349aecb99644cbe /src
parent703cd1b9586a035ab9f7f76786a04d3019fd5818 (diff)
downloadpoezio-2fe84a118865f06df89d02e6b733194d21639517.tar.gz
poezio-2fe84a118865f06df89d02e6b733194d21639517.tar.bz2
poezio-2fe84a118865f06df89d02e6b733194d21639517.tar.xz
poezio-2fe84a118865f06df89d02e6b733194d21639517.zip
Fix a crash for python < 3.3
Diffstat (limited to 'src')
-rw-r--r--src/logger.py5
1 files 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