From 180bbf012b2928f6f33018cd7e44b54cdda53fde Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Mon, 9 May 2016 21:31:05 +0100 Subject: Tidy maskaudit.py -dt output by quoting grep input. Otherwise get things like: sh: 1: Syntax error: "(" unexpected (expecting "}") when processing INTERNAL_SET(n) --- maskaudit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maskaudit.py b/maskaudit.py index 48058098..32497e6f 100755 --- a/maskaudit.py +++ b/maskaudit.py @@ -45,11 +45,11 @@ class SourceExtractor(object): self.primitive_masks.append((fields[1], fields[2])) def in_library(self, flag): - (status, _output) = getstatusoutput("grep %s libgps_core.c libgps_json.c gpsctl.c" % flag) + (status, _output) = getstatusoutput("grep '%s' libgps_core.c libgps_json.c gpsctl.c" % flag) return status == 0 def in_daemon(self, flag): - (status, _output) = getstatusoutput("grep %s %s" % (flag, " ".join(self.daemonfiles))) + (status, _output) = getstatusoutput("grep '%s' %s" % (flag, " ".join(self.daemonfiles))) return status == 0 def relevant(self, flag): -- cgit v1.2.1