MCPcopy
hub / github.com/pimutils/vdirsyncer / delete

Method delete

vdirsyncer/storage/filesystem.py:151–158  ·  view source on GitHub ↗
(self, href, etag)

Source from the content-addressed store, hash-verified

149 return etag
150
151 def delete(self, href, etag):
152 fpath = self._get_filepath(href)
153 if not os.path.isfile(fpath):
154 raise exceptions.NotFoundError(href)
155 actual_etag = get_etag_from_file(fpath)
156 if etag != actual_etag:
157 raise exceptions.WrongEtagError(etag, actual_etag)
158 os.remove(fpath)
159
160 def _run_post_hook(self, fpath):
161 logger.info('Calling post_hook={} with argument={}'.format(

Callers

nothing calls this directly

Calls 2

_get_filepathMethod · 0.95
get_etag_from_fileFunction · 0.85

Tested by

no test coverage detected