From 9db26c495a2b492fec52c4687c567b5d1a4f69c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= Date: Thu, 18 Jul 2024 11:35:15 +0100 Subject: [PATCH] Fix problems detected by pylint execution --- python/spacewalk/server/importlib/backendOracle.py | 6 ++++-- python/spacewalk/server/importlib/packageImport.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/python/spacewalk/server/importlib/backendOracle.py b/python/spacewalk/server/importlib/backendOracle.py index 38162663c149..307267403ae8 100644 --- a/python/spacewalk/server/importlib/backendOracle.py +++ b/python/spacewalk/server/importlib/backendOracle.py @@ -771,5 +771,7 @@ def init(self): def SQLBackend(): if CFG.DB_BACKEND == POSTGRESQL: backend = PostgresqlBackend() - backend.init() - return backend + backend.init() + return backend + else: + raise ValueError("The selected DB_BACKEND is not supported") diff --git a/python/spacewalk/server/importlib/packageImport.py b/python/spacewalk/server/importlib/packageImport.py index 71b12c73dc3e..4fc463262649 100644 --- a/python/spacewalk/server/importlib/packageImport.py +++ b/python/spacewalk/server/importlib/packageImport.py @@ -340,6 +340,7 @@ def _processPackage(self, package): self.checksums[fchecksumTuple] = None # Check whether package is a PTF or part of PTF + # pylint: disable-next=consider-iterating-dictionary for cap in self.capabilities.keys(): if cap[0] == "ptf()": package["is_ptf"] = True