diff options
| author | mat <github@matdoes.dev> | 2022-05-25 00:38:27 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-25 00:38:27 -0500 |
| commit | 856353458cfcc60b5071bdd66ae8176bd3d2287e (patch) | |
| tree | 49527c2404c17d67bd485bc7c4c71a89e6590f71 | |
| parent | 8953cf43e25ca93103fbc3551ac658e1b56679df (diff) | |
| download | azalea-drasl-856353458cfcc60b5071bdd66ae8176bd3d2287e.tar.xz | |
don't error
| -rw-r--r-- | codegen/migrate.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/codegen/migrate.py b/codegen/migrate.py index edcf85a7..75cbe122 100644 --- a/codegen/migrate.py +++ b/codegen/migrate.py @@ -34,8 +34,8 @@ for packet in new_packet_list: # find removed packets removed_packets: list[PacketIdentifier] = [] -for packet in old_packets: - if packet not in new_packets or new_packets[packet] != old_packets[packet]: +for packet, packet_name in old_packets.items(): + if packet_name not in old_packets.values(): removed_packets.append(packet) print('Removed packet:', packet) for (direction, state), packets in group_packets(removed_packets).items(): @@ -59,8 +59,8 @@ print() # find added packets added_packets: list[PacketIdentifier] = [] -for packet in new_packets: - if packet not in old_packets and new_packets[packet] == old_packets[packet]: +for packet, packet_name in new_packets.items(): + if packet_name not in old_packets.values(): added_packets.append(packet) print('Added packet:', packet) for packet in added_packets: |
