forked from adamm/git-importer
Fix up some code after aplanas' continued review
This commit is contained in:
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from hashlib import md5
|
||||
from pathlib import PurePath
|
||||
from typing import Optional
|
||||
|
||||
from lib.db import DB
|
||||
@@ -223,11 +224,11 @@ class DBRevision:
|
||||
for entry in self.files_list(db):
|
||||
if old_files.get(entry["name"]) != f"{entry['md5']}-{entry['size']}":
|
||||
logging.debug(f"Download {entry['name']}")
|
||||
to_download.append((entry["name"], entry["md5"]))
|
||||
to_download.append((PurePath(entry["name"]), entry["md5"]))
|
||||
old_files.pop(entry["name"], None)
|
||||
for entry in old_files.keys():
|
||||
logging.debug(f"Delete {entry}")
|
||||
to_delete.append(entry)
|
||||
to_delete.append(PurePath(entry))
|
||||
return to_download, to_delete
|
||||
|
||||
@staticmethod
|
||||
|
Reference in New Issue
Block a user