Skip to content

Commit

Permalink
ros2#1043 Writer choices set to list (ros2#1044)
Browse files Browse the repository at this point in the history
* Set to list: writer_choices: record.py

Signed-off-by: EsipovPA <esipov.p@mail.ru>

* Set to list: storage_choices: reindex.py

Signed-off-by: EsipovPA <esipov.p@mail.ru>
  • Loading branch information
EsipovPA authored Jul 26, 2022
1 parent 5dc9e7f commit 9291bcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ros2bag/ros2bag/verb/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class RecordVerb(VerbExtension):

def add_arguments(self, parser, cli_name): # noqa: D102
writer_choices = get_registered_writers()
default_writer = 'sqlite3' if 'sqlite3' in writer_choices else writer_choices[0]
default_writer = 'sqlite3' if 'sqlite3' in writer_choices else \
next(iter(writer_choices))

compression_format_choices = get_registered_compressors()
serialization_choices = get_registered_serializers()
Expand Down
4 changes: 3 additions & 1 deletion ros2bag/ros2bag/verb/reindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ class ReindexVerb(VerbExtension):

def add_arguments(self, parser, cli_name):
storage_choices = get_registered_readers()
default_storage = 'sqlite3' if 'sqlite3' in storage_choices else storage_choices[0]
default_storage = 'sqlite3' if 'sqlite3' in storage_choices else \
next(iter(storage_choices))

parser.add_argument(
'bag_directory', type=check_path_exists, help='bag to reindex')
parser.add_argument(
Expand Down

0 comments on commit 9291bcb

Please sign in to comment.