From 18fbb594be544e6047024b4dff98c93b23807c5f Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Wed, 7 Aug 2019 19:17:54 -0400 Subject: [PATCH] Wrap the rosbag filter eval in a lambda (#1712) --- tools/rosbag/src/rosbag/rosbag_main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/rosbag/src/rosbag/rosbag_main.py b/tools/rosbag/src/rosbag/rosbag_main.py index 8d4a483c61..5dcfbfe68e 100644 --- a/tools/rosbag/src/rosbag/rosbag_main.py +++ b/tools/rosbag/src/rosbag/rosbag_main.py @@ -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