sources: generalize cache generation
Introduce a `setup` step in the workflow that is responsible of generating the cache folder. This is then used in each download method.
This commit is contained in:
parent
5337374b50
commit
34cd9ef9f0
5 changed files with 12 additions and 14 deletions
|
|
@ -166,10 +166,8 @@ def download(items, cache):
|
|||
class CurlSource(sources.SourceService):
|
||||
|
||||
def download(self, items, cache, _options):
|
||||
cache = os.path.join(cache, "org.osbuild.files")
|
||||
os.makedirs(cache, exist_ok=True)
|
||||
|
||||
download(items, cache)
|
||||
self.setup(cache, "org.osbuild.files")
|
||||
download(items, self.cache)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue