diff options
| author | J08nY | 2017-08-08 00:27:27 +0200 |
|---|---|---|
| committer | J08nY | 2017-08-08 00:27:27 +0200 |
| commit | b7ea4be65c8765db8732a72c3c39ae28985991cd (patch) | |
| tree | 5376d265d89077a6d4f3ebc95586f3454477b2a9 /src | |
| parent | 473be2735dffc63b1ba759739ebfa7e471bc1495 (diff) | |
| download | mailman-pgp-b7ea4be65c8765db8732a72c3c39ae28985991cd.tar.gz mailman-pgp-b7ea4be65c8765db8732a72c3c39ae28985991cd.tar.zst mailman-pgp-b7ea4be65c8765db8732a72c3c39ae28985991cd.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman_pgp/model/fs_key.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mailman_pgp/model/fs_key.py b/src/mailman_pgp/model/fs_key.py index 118f971..b72c76f 100644 --- a/src/mailman_pgp/model/fs_key.py +++ b/src/mailman_pgp/model/fs_key.py @@ -18,6 +18,7 @@ """Filesystem stored PGP key.""" from os import remove, urandom from os.path import getmtime, getsize, join +from pathlib import Path from public import public @@ -32,7 +33,10 @@ class FSKey: def __init__(self, keydir, keyfile, load=False): self._key = None self._mtime = None - self.keydir = keydir + if isinstance(keydir, Path): + self.keydir = str(keydir) + else: + self.keydir = keydir self.keyfile = keyfile if load: self.load() |
