Add the file_md5 to the download function so it can cache and verify

This commit is contained in:
Stephan Kulow
2022-11-02 13:35:45 +01:00
parent a1ead29734
commit 05cf792b26
3 changed files with 11 additions and 4 deletions

View File

@@ -152,7 +152,13 @@ class OBS:
return osc.core.http_GET(url)
def download(
self, project: str, package: str, name: str, revision: str, dirpath: str
self,
project: str,
package: str,
name: str,
revision: str,
dirpath: str,
file_md5: str,
) -> None:
with (dirpath / name).open("wb") as f:
f.write(self._download(project, package, name, revision).read())