diff options
author | mathieui <mathieui@mathieui.net> | 2013-08-06 22:23:47 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-08-06 22:23:47 +0200 |
commit | 2fe84a118865f06df89d02e6b733194d21639517 (patch) | |
tree | 4541917dcdaab1234c68577b3349aecb99644cbe | |
parent | 703cd1b9586a035ab9f7f76786a04d3019fd5818 (diff) | |
download | poezio-2fe84a118865f06df89d02e6b733194d21639517.tar.gz poezio-2fe84a118865f06df89d02e6b733194d21639517.tar.bz2 poezio-2fe84a118865f06df89d02e6b733194d21639517.tar.xz poezio-2fe84a118865f06df89d02e6b733194d21639517.zip |
Fix a crash for python < 3.3
-rw-r--r-- | src/logger.py | 5 |
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 |