From 65a73edc6245dcd5858db65f16ba83493bae403e Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 6 Aug 2013 22:30:03 +0200 Subject: Fix the same issue with the OTR plugin --- plugins/otr.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins') 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') -- cgit v1.2.3