Fix up some code after aplanas' continued review

This commit is contained in:
Stephan Kulow
2022-11-02 15:14:38 +01:00
parent 6ac0f90ec7
commit 172242891d
6 changed files with 21 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
import logging
import os
from pathlib import Path
import yaml
@@ -121,10 +122,8 @@ class GitExporter:
logging.debug(f"Committing {flat}")
self.commit_flat(db, flat, branch_state)
def limit_download(self, file):
if file.endswith(".spec") or file.endswith(".changes"):
return True
return False
def limit_download(self, file: Path):
return file.suffix in (".spec", ".changes")
def commit_flat(self, db, flat, branch_state):
parents = []
@@ -144,7 +143,7 @@ class GitExporter:
self.obs.download(
flat.commit.project,
flat.commit.package,
file,
file.name,
flat.commit.expanded_srcmd5,
self.git.path,
file_md5=md5,