From 2a7bbb8ee5c60f452a37d512697a1487300d1386 Mon Sep 17 00:00:00 2001 From: lovetox Date: Sun, 28 Jun 2020 21:05:39 +0200 Subject: [PATCH] [openpgp] Use pathlib --- openpgp/pgpplugin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openpgp/pgpplugin.py b/openpgp/pgpplugin.py index bc62dbc..254e2e9 100644 --- a/openpgp/pgpplugin.py +++ b/openpgp/pgpplugin.py @@ -99,10 +99,11 @@ class OpenPGPPlugin(GajimPlugin): except Exception: log.exception('Error loading application css') - def _create_paths(self): - keyring_path = os.path.join(configpaths.get('MY_DATA'), 'openpgp') - if not os.path.exists(keyring_path): - os.makedirs(keyring_path) + @staticmethod + def _create_paths(): + keyring_path = Path(configpaths.get('MY_DATA')) / 'openpgp' + if not keyring_path.exists(): + keyring_path.mkdir() def signed_in(self, event): account = event.conn.name