Skip to content

Commit

Permalink
put quotes around file name so it is possible to double click and cop…
Browse files Browse the repository at this point in the history
…y it in a terminal without including the period at the end
  • Loading branch information
lucasw committed Feb 25, 2024
1 parent 57dd6e9 commit 8e795e2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/rosbag/src/rosbag/rosbag_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def info_cmd(argv):
except (ROSBagEncryptNotSupportedException, ROSBagEncryptException) as ex:
print('ERROR: %s' % str(ex), file=sys.stderr)
except ROSBagUnindexedException as ex:
print('ERROR bag unindexed: %s. Run rosbag reindex.' % arg,
print('ERROR bag unindexed: "%s". Run rosbag reindex.' % arg,
file=sys.stderr)
sys.exit(1)
except ROSBagException as ex:
Expand Down Expand Up @@ -365,7 +365,7 @@ def expr_eval(expr):
print('ERROR: %s' % str(ex), file=sys.stderr)
return
except ROSBagUnindexedException as ex:
print('ERROR bag unindexed: %s. Run rosbag reindex.' % inbag_filename, file=sys.stderr)
print('ERROR bag unindexed: "%s". Run rosbag reindex.' % inbag_filename, file=sys.stderr)
sys.exit(1)

try:
Expand Down Expand Up @@ -465,7 +465,7 @@ def fix_cmd(argv):
print('ERROR: %s' % str(ex), file=sys.stderr)
return
except ROSBagUnindexedException as ex:
print('ERROR bag unindexed: %s. Run rosbag reindex.' % inbag_filename,
print('ERROR bag unindexed: "%s". Run rosbag reindex.' % inbag_filename,
file=sys.stderr)
sys.exit(1)

Expand Down Expand Up @@ -516,7 +516,7 @@ def check_cmd(argv):
print('ERROR: %s' % str(ex), file=sys.stderr)
return
except ROSBagUnindexedException as ex:
print('ERROR bag unindexed: %s. Run rosbag reindex.' % args[0], file=sys.stderr)
print('ERROR bag unindexed: "%s". Run rosbag reindex.' % args[0], file=sys.stderr)
sys.exit(1)

mm = MessageMigrator(args[1:] + append_rule, not options.noplugins)
Expand Down Expand Up @@ -673,7 +673,7 @@ def bag_op(inbag_filenames, allow_unindexed, open_inbag, copy_fn, op, output_dir
try:
inbag = Bag(inbag_filename, 'r', allow_unindexed=allow_unindexed)
except ROSBagUnindexedException:
print('ERROR bag unindexed: %s. Run rosbag reindex.' % inbag_filename, file=sys.stderr)
print('ERROR bag unindexed: "%s". Run rosbag reindex.' % inbag_filename, file=sys.stderr)
continue
except (ROSBagException, IOError) as ex:
print('ERROR reading %s: %s' % (inbag_filename, str(ex)), file=sys.stderr)
Expand All @@ -699,7 +699,7 @@ def bag_op(inbag_filenames, allow_unindexed, open_inbag, copy_fn, op, output_dir

if not force and os.path.exists(backup_filename):
if not quiet:
print('Skipping %s. Backup path %s already exists.' % (inbag_filename, backup_filename), file=sys.stderr)
print('Skipping "%s". Backup path %s already exists.' % (inbag_filename, backup_filename), file=sys.stderr)
continue

try:
Expand Down

0 comments on commit 8e795e2

Please sign in to comment.