Convert connections attribute to list
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user