aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/testing/layers.py
diff options
context:
space:
mode:
authorJ08nY2017-07-07 20:06:43 +0200
committerJ08nY2017-07-07 20:06:43 +0200
commit3c15bcc9b8a838439de4301f8c9f1a73b522ac4b (patch)
tree09fe0ddde25964409ba75b04302886eb67c4e71f /src/mailman_pgp/testing/layers.py
parent0724647197d26b221dc2b090c407a07401962a68 (diff)
downloadmailman-pgp-3c15bcc9b8a838439de4301f8c9f1a73b522ac4b.tar.gz
mailman-pgp-3c15bcc9b8a838439de4301f8c9f1a73b522ac4b.tar.zst
mailman-pgp-3c15bcc9b8a838439de4301f8c9f1a73b522ac4b.zip
Diffstat (limited to 'src/mailman_pgp/testing/layers.py')
-rw-r--r--src/mailman_pgp/testing/layers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mailman_pgp/testing/layers.py b/src/mailman_pgp/testing/layers.py
index 4cadd3a..5e0d8b3 100644
--- a/src/mailman_pgp/testing/layers.py
+++ b/src/mailman_pgp/testing/layers.py
@@ -27,8 +27,9 @@ from mailman_pgp.model.base import Base
def reset_pgp_world():
for keydir in (config.pgp.keydir_config.values()):
for path in os.listdir(keydir):
- if isfile(path):
- os.remove(path)
+ full_path = os.path.join(keydir, path)
+ if isfile(full_path):
+ os.remove(full_path)
with transaction():
Base.metadata.drop_all(config.db.engine)
Base.metadata.create_all(config.db.engine)