Fix the maintenance of .gitattributes file #17

Merged
Ghost merged 14 commits from fix_lfs_attributes into main 2022-11-07 13:26:36 +01:00
Showing only changes of commit 4e1d5b42ca - Show all commits

View File

@ -168,14 +168,15 @@ class OBS:
if not self.in_cache(name, cachedir, file_md5):
with (dirpath / name).open("wb") as f:
f.write(self._download(project, package, name, revision).read())
shutil.copy(dirpath / name, cached_file)
# Validate the MD5 of the downloaded file
if md5(cached_file) != file_md5:
raise Exception(f"Download error in {name}")
else:
shutil.copy(cached_file, dirpath / name)
# Validate the MD5 of the downloaded file
if md5(dirpath / name) != file_md5:
raise Exception(f"Download error in {name}")
def list(self, project, package, srcmd5, linkrev):
params = {"rev": srcmd5, "expand": "1"}
if linkrev: