Fix the case where r.prefix_indices is None (#1031)
This commit is contained in:
@@ -35,7 +35,6 @@ class PolicyScheduler:
|
|||||||
self.tree_cache = tree_cache
|
self.tree_cache = tree_cache
|
||||||
|
|
||||||
def calc_priority(self, waiting_queue: List[Req]):
|
def calc_priority(self, waiting_queue: List[Req]):
|
||||||
if self.policy in ["lpm", "dfs-weight"]:
|
|
||||||
# Compute matched prefix length
|
# Compute matched prefix length
|
||||||
for r in waiting_queue:
|
for r in waiting_queue:
|
||||||
# NOTE: the prefix_indices must always be aligned with last_node
|
# NOTE: the prefix_indices must always be aligned with last_node
|
||||||
|
|||||||
Reference in New Issue
Block a user