From 9b93a28bd0f7dcb9ac2b6832dd679bd20391708c Mon Sep 17 00:00:00 2001 From: Mike Purvis Date: Tue, 30 Apr 2019 18:49:48 -0400 Subject: [PATCH] Wrap the rosbag filter eval in a lambda --- 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