Skip to content

Commit cf80758

Browse files
jmbergkuba-moo
authored andcommitted
pw_poller: use configured trees for subject tag match
There's no need to hard-code the list of trees when we actually have it in the configuration. Signed-off-by: Johannes Berg <[email protected]>
1 parent eff30c5 commit cf80758

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

netdev/tree_match.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
from core import log, log_open_sec, log_end_sec
1010

1111

12-
def series_tree_name_direct(series):
13-
for t in ['net-next', 'bpf-next', 'net', 'bpf']:
12+
def series_tree_name_direct(conf_trees, series):
13+
for t in conf_trees:
1414
if re.match(r'\[.*{pfx}.*\]'.format(pfx=t), series.subject):
1515
return t
1616

pw_poller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def init_state_from_disk(self) -> None:
9292
pass
9393

9494
def _series_determine_tree(self, s: PwSeries) -> str:
95-
s.tree_name = self.list_module.series_tree_name_direct(s)
95+
s.tree_name = self.list_module.series_tree_name_direct(self._trees.keys(), s)
9696
s.tree_mark_expected = True
9797
s.tree_marked = bool(s.tree_name)
9898

0 commit comments

Comments
 (0)