aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/code/packet.py
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/lib/code/packet.py')
-rw-r--r--codegen/lib/code/packet.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py
index 50d01ce2..9ce5c137 100644
--- a/codegen/lib/code/packet.py
+++ b/codegen/lib/code/packet.py
@@ -1,4 +1,4 @@
-from lib.utils import to_snake_case, to_camel_case, get_dir_location
+from lib.utils import identifier_to_path, to_snake_case, to_camel_case, get_dir_location
from lib.code.utils import burger_type_to_rust_type, write_packet_file
from lib.mappings import Mappings
from typing import Optional
@@ -120,7 +120,7 @@ def packet_direction_report_to_packet_names(report):
name_to_id = {}
for identifier, packet in report.items():
packet_id = packet["protocol_id"]
- name_to_id[identifier.split(":")[-1]] = packet_id
+ name_to_id[identifier_to_path(identifier)] = packet_id
names_sorted = [name for name in sorted(name_to_id, key=lambda x: name_to_id[x])]
return names_sorted