Merge pull request #2191 from jberry-suse/request-splitter-python3
osclib/request_splitter: replace map() calls with loop and call.
This commit is contained in:
commit
79a13dddfe
@ -329,7 +329,8 @@ class RequestSplitter(object):
|
|||||||
'devel',
|
'devel',
|
||||||
)
|
)
|
||||||
|
|
||||||
map(self.strategy_try, strategies)
|
for strategy in strategies:
|
||||||
|
self.strategy_try(strategy)
|
||||||
|
|
||||||
def strategy_try(self, name):
|
def strategy_try(self, name):
|
||||||
self.strategy_set(name)
|
self.strategy_set(name)
|
||||||
@ -414,10 +415,12 @@ class StrategyCustom(StrategyNone):
|
|||||||
if 'filters' not in self.kwargs:
|
if 'filters' not in self.kwargs:
|
||||||
super(StrategyCustom, self).apply(splitter)
|
super(StrategyCustom, self).apply(splitter)
|
||||||
else:
|
else:
|
||||||
map(splitter.filter_add, self.kwargs['filters'])
|
for xpath in self.kwargs['filters']:
|
||||||
|
splitter.filter_add(xpath)
|
||||||
|
|
||||||
if 'groups' in self.kwargs:
|
if 'groups' in self.kwargs:
|
||||||
map(splitter.group_by, self.kwargs['groups'])
|
for group in self.kwargs['groups']:
|
||||||
|
splitter.group_by(group)
|
||||||
|
|
||||||
class StrategyDevel(StrategyNone):
|
class StrategyDevel(StrategyNone):
|
||||||
GROUP_MIN = 7
|
GROUP_MIN = 7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user