Fix the same issue with the OTR plugin

This commit is contained in:
mathieui 2013-08-06 22:30:03 +02:00
parent 2fe84a1188
commit 65a73edc62

View file

@ -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')