Skip to content

Commit

Permalink
Do not use list comprehension in favor of more efficient way
Browse files Browse the repository at this point in the history
  • Loading branch information
meaksh committed Jul 18, 2024
1 parent 080833a commit 691d013
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/spacewalk/server/importlib/packageImport.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,12 @@ def _processPackage(self, package):
if fchecksumTuple not in self.checksums:
self.checksums[fchecksumTuple] = None

package["is_ptf"] = any([x[0] == "ptf()" for x in self.capabilities.keys()])
package["is_part_of_ptf"] = any(
[x[0] == "ptf-package()" for x in self.capabilities.keys()]
)
# Check whether package is a PTF or part of PTF
for cap in self.capabilities.keys():
if cap[0] == "ptf()":
package["is_ptf"] = True
elif cap[0] == "ptf-package()":
package["is_part_of_ptf"] = True

# Uniquify changelog entries
unique_package_changelog_hash = set()
Expand Down

0 comments on commit 691d013

Please sign in to comment.