[openpgp] Use pathlib

This commit is contained in:
lovetox
2020-06-28 21:05:39 +02:00
parent 8d5d009cb8
commit 2a7bbb8ee5

View File

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