Skip to content

Commit

Permalink
Wrap the rosbag filter eval in a lambda (#1712)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepurvis authored and dirk-thomas committed Aug 7, 2019
1 parent 8ea6ecd commit 18fbb59
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/rosbag/src/rosbag/rosbag_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,7 @@ def play_cmd(argv):

def filter_cmd(argv):
def expr_eval(expr):
def eval_fn(topic, m, t):
return eval(expr)
return eval_fn
return eval("lambda topic, m, t: %s" % expr)

parser = optparse.OptionParser(usage="""rosbag filter [options] INBAG OUTBAG EXPRESSION
Expand Down

0 comments on commit 18fbb59

Please sign in to comment.