Skip to content

Commit

Permalink
[WIP] Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cbbayburt committed Apr 16, 2024
1 parent 96c1ee5 commit 33c4456
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions python/spacewalk/satellite_tools/reposync.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
dumpEMAIL_LOG,
log2background,
)
from spacewalk.satellite_tools.appstreams import (ModuleMdImporter, ModuleMdIndexingError)
from spacewalk.satellite_tools.appstreams import ModuleMdImporter, ModuleMdIndexingError

translation = gettext.translation("spacewalk-backend-server", fallback=True)
_ = translation.gettext
Expand Down Expand Up @@ -757,11 +757,16 @@ def sync(self, update_repodata=True):
if repo_type == "yum":
modulemd_path = self.import_modules(plugin)
if modulemd_path:
modulemd_importer = ModuleMdImporter(self.channel["id"], modulemd_path)
modulemd_importer = ModuleMdImporter(
self.channel["id"], modulemd_path
)
try:
modulemd_importer.validate()
except ModuleMdIndexingError as e:
log(0, f"An error occurred while reading module metadata: {e}")
log(
0,
f"An error occurred while reading module metadata: {e}",
)
self.sendErrorMail(str(e))
sync_error = -1

Expand Down Expand Up @@ -1149,7 +1154,9 @@ def import_groups(self, plug):
def import_modules(self, plug):
modulesfile = plug.get_modules()
if modulesfile:
return self.copy_metadata_file(plug, modulesfile, "modules", relative_modules_dir)
return self.copy_metadata_file(
plug, modulesfile, "modules", relative_modules_dir
)

def import_mediaproducts(self, plug):
mediaproducts = plug.get_mediaproducts()
Expand Down

0 comments on commit 33c4456

Please sign in to comment.