[openpgp] Use pathlib
This commit is contained in:
@@ -99,10 +99,11 @@ class OpenPGPPlugin(GajimPlugin):
|
|||||||
except Exception:
|
except Exception:
|
||||||
log.exception('Error loading application css')
|
log.exception('Error loading application css')
|
||||||
|
|
||||||
def _create_paths(self):
|
@staticmethod
|
||||||
keyring_path = os.path.join(configpaths.get('MY_DATA'), 'openpgp')
|
def _create_paths():
|
||||||
if not os.path.exists(keyring_path):
|
keyring_path = Path(configpaths.get('MY_DATA')) / 'openpgp'
|
||||||
os.makedirs(keyring_path)
|
if not keyring_path.exists():
|
||||||
|
keyring_path.mkdir()
|
||||||
|
|
||||||
def signed_in(self, event):
|
def signed_in(self, event):
|
||||||
account = event.conn.name
|
account = event.conn.name
|
||||||
|
|||||||
Reference in New Issue
Block a user