diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-08-01 13:48:44 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-08-01 15:18:54 +0300 |
commit | 036a863b00fe079e13bb1640267078ec47e6f9e5 (patch) | |
tree | 8363e515b4716375aa723f6db37f05611e806399 /qvisqve/file_store.py | |
parent | bfd3be221e51f9d140c68a40f72ce38ac3aad7ca (diff) | |
download | qvisqve-036a863b00fe079e13bb1640267078ec47e6f9e5.tar.gz |
Add: management API
Diffstat (limited to 'qvisqve/file_store.py')
-rw-r--r-- | qvisqve/file_store.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qvisqve/file_store.py b/qvisqve/file_store.py index 3fd5186..b22f2e7 100644 --- a/qvisqve/file_store.py +++ b/qvisqve/file_store.py @@ -56,6 +56,11 @@ class FileStore: with open(filename, 'w') as f: yaml.safe_dump(resource, stream=f) + def delete(self, resource_type, resource_id): + filename = self._filename(resource_type, resource_id) + if os.path.exists(filename): + os.remove(filename) + class ResourceStoreError(Exception): |