summaryrefslogtreecommitdiff
path: root/maskaudit.py
diff options
context:
space:
mode:
authorRob Norris <rw_norris@hotmail.com>2016-05-09 21:31:05 +0100
committerEric S. Raymond <esr@thyrsus.com>2016-05-09 17:10:13 -0400
commit180bbf012b2928f6f33018cd7e44b54cdda53fde (patch)
treebae745a90047a0b8b2382c8de552aa8c090a764c /maskaudit.py
parentec6b40fe326f3fc0415fa331468f76b021532e23 (diff)
downloadgpsd-180bbf012b2928f6f33018cd7e44b54cdda53fde.tar.gz
Tidy maskaudit.py -dt output by quoting grep input.
Otherwise get things like: sh: 1: Syntax error: "(" unexpected (expecting "}") when processing INTERNAL_SET(n)
Diffstat (limited to 'maskaudit.py')
-rwxr-xr-xmaskaudit.py4
1 files 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):