summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-08-06 22:30:03 +0200
committermathieui <mathieui@mathieui.net>2013-08-06 22:30:03 +0200
commit65a73edc6245dcd5858db65f16ba83493bae403e (patch)
tree0ac735d336c3297b63c48d685761028f4a11c3c4
parent2fe84a118865f06df89d02e6b733194d21639517 (diff)
downloadpoezio-65a73edc6245dcd5858db65f16ba83493bae403e.tar.gz
poezio-65a73edc6245dcd5858db65f16ba83493bae403e.tar.bz2
poezio-65a73edc6245dcd5858db65f16ba83493bae403e.tar.xz
poezio-65a73edc6245dcd5858db65f16ba83493bae403e.zip
Fix the same issue with the OTR plugin
-rw-r--r--plugins/otr.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/otr.py b/plugins/otr.py
index b79ffcf1..90b4a855 100644
--- a/plugins/otr.py
+++ b/plugins/otr.py
@@ -255,8 +255,11 @@ class Plugin(BasePlugin):
OTR_DIR = os.path.expanduser(self.config.get('keys_dir', '') or OTR_DIR)
try:
os.makedirs(OTR_DIR)
- except FileExistsError:
- pass
+ except OSError as e:
+ if e.errno != 17:
+ self.api.information('The OTR-specific folder could not be created'
+ ' poezio will be unable to save keys and trusts', 'OTR')
+
except:
self.api.information('The OTR-specific folder could not be created'
' poezio will be unable to save keys and trusts', 'OTR')