From: Y Bharath Date: Thu, 3 Apr 2025 16:00:20 +0000 (+0530) Subject: tests: Shadowing the built-in function X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=920ef44023f8a3fe822347539bfb73991ccdf871;p=matthieu%2Ffrr.git tests: Shadowing the built-in function Shadowing the built-in function Signed-off-by: y-bharath14 --- diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index f34c48b890..54142e8526 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -196,7 +196,7 @@ def get_seq_id(obj_type, router, obj_name): return seq_id -def set_seq_id(obj_type, router, id, obj_name): +def set_seq_id(obj_type, router, sequence_id, obj_name): """ Saves sequence number if not auto-generated and given by user Parameters @@ -209,7 +209,7 @@ def set_seq_id(obj_type, router, id, obj_name): obj_data = router_data.setdefault(obj_name, {}) seq_id = obj_data.setdefault("seq_id", 0) - seq_id = int(seq_id) + int(id) + seq_id = int(seq_id) + int(sequence_id) obj_data["seq_id"] = seq_id @@ -2539,10 +2539,10 @@ def create_route_maps(tgen, input_dict, build=False): ) return False if large_comm_list: - id = large_comm_list.setdefault("id", None) + comm_id = large_comm_list.setdefault("id", None) del_comm = large_comm_list.setdefault("delete", None) - if id: - cmd = "set large-comm-list {}".format(id) + if comm_id: + cmd = "set large-comm-list {}".format(comm_id) if del_comm: cmd = "{} delete".format(cmd) @@ -4608,7 +4608,7 @@ class HostApplicationHelper(object): self.init() return self - def __exit__(self, type, value, traceback): + def __exit__(self, exit_type, exit_value, exit_traceback): self.cleanup() def __str__(self):