mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-06 13:02:37 +00:00
replace iterator by generator (#205)
Fix network_sanity_ee_tests SUMMARY Network sanity ee tests are broken ISSUE TYPE Bugfix Pull Request COMPONENT NAME ADDITIONAL INFORMATION Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: None <None>
This commit is contained in:
@@ -40,7 +40,7 @@ class Selector(object):
|
||||
self._operator = m.group(4)
|
||||
self._data = [x.replace(' ', '') for x in m.group(6).split(',') if x != '']
|
||||
return True
|
||||
elif all([x not in data for x in self.equality_based_operators]):
|
||||
elif all(x not in data for x in self.equality_based_operators):
|
||||
self._key = data.rstrip(" ").lstrip(" ")
|
||||
if self._key.startswith("!"):
|
||||
self._key = self._key[1:].lstrip(" ")
|
||||
@@ -68,4 +68,4 @@ class LabelSelectorFilter(object):
|
||||
labels = definition['metadata']['labels']
|
||||
if not isinstance(labels, dict):
|
||||
return None
|
||||
return all([sel.isMatch(labels) for sel in self.selectors])
|
||||
return all(sel.isMatch(labels) for sel in self.selectors)
|
||||
|
||||
Reference in New Issue
Block a user