Make database usage the default

Some cleanup of no longer used functions
This commit is contained in:
Stephan Kulow
2022-11-01 11:23:40 +01:00
parent 9554fea7e1
commit 9ed8abad2b
5 changed files with 22 additions and 70 deletions

View File

@@ -1,3 +1,4 @@
import logging
from hashlib import md5
from lib.db import DB
@@ -213,11 +214,11 @@ class DBRevision:
old_files[entry["name"]] = f"{entry['md5']}-{entry['size']}"
for entry in self.files_list(db):
if old_files.get(entry["name"], "") != f"{entry['md5']}-{entry['size']}":
print("Download", entry["name"])
logging.debug(f"Download {entry['name']}")
to_download.append(entry["name"])
old_files.pop(entry["name"], None)
for entry in old_files.keys():
print("Delete", entry)
logging.debug(f"Delete {entry}")
to_delete.append(entry)
return to_download, to_delete