Convert connections attribute to list

This commit is contained in:
Marko Durkovic
2022-04-21 15:15:10 +02:00
parent f7d69e35d5
commit 34ffe96692
14 changed files with 72 additions and 74 deletions
@@ -23,7 +23,7 @@ def offset_timestamps(src: Path, dst: Path, offset: int) -> None:
"""
with Reader(src) as reader, Writer(dst) as writer:
conn_map = {}
for conn in reader.connections.values():
for conn in reader.connections:
ext = cast(ConnectionExtRosbag2, conn.ext)
conn_map[conn.id] = writer.add_connection(
conn.topic,
+1 -1
View File
@@ -22,7 +22,7 @@ def remove_topic(src: Path, dst: Path, topic: str) -> None:
"""
with Reader(src) as reader, Writer(dst) as writer:
conn_map = {}
for conn in reader.connections.values():
for conn in reader.connections:
if conn.topic == topic:
continue
ext = cast(ConnectionExtRosbag2, conn.ext)
+1 -1
View File
@@ -20,7 +20,7 @@ def process_bag(src: Path) -> None:
"""
with Reader(src) as reader:
typs = {}
for conn in reader.connections.values():
for conn in reader.connections:
typs.update(get_types_from_msg(conn.msgdef, conn.msgtype))
register_types(typs)