[Minor] Improve style (#1666)
This commit is contained in:
@@ -45,7 +45,7 @@ class SchedulePolicy:
|
||||
def calc_priority(self, waiting_queue: List[Req]):
|
||||
# Compute matched prefix length
|
||||
prefix_computed = False
|
||||
if self.policy in ["lpm", "dfs-weight"]:
|
||||
if self.policy == "lpm" or self.policy == "dfs-weight":
|
||||
for r in waiting_queue:
|
||||
# NOTE: the prefix_indices must always be aligned with last_node
|
||||
r.prefix_indices, r.last_node = self.tree_cache.match_prefix(
|
||||
|
||||
Reference in New Issue
Block a user