Browse Source

Merge branch 'master' into try-before-quit

pull/115/head
as 5 years ago
committed by GitHub
parent
commit
8aeeb57235
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .gitignore
  2. 13
      deletefb/tools/archive.py

1
.gitignore

@ -2,3 +2,4 @@
__pycache__
venv
.mypy_cache
deletefb.log

13
deletefb/tools/archive.py

@ -49,9 +49,20 @@ class Archive:
self._bloom_filter.add(content.name)
return
class FakeArchive:
def archive(self, content):
"""
Do not archive an object
"""
return
@contextmanager
def archiver(archive_type):
if not settings["ARCHIVE"]:
yield FakeArchive()
else:
archive_file = open(
str((Path(".") / Path(archive_type).name).with_suffix(".log.{0}".format(time()))),
mode="ta",

Loading…
Cancel
Save