grepid: omit stack dump on ctrl+c

This commit is contained in:
Josh Holtrop 2012-07-27 14:09:35 -04:00
parent ef0e252883
commit d3bb906b81

3
grepid
View File

@ -59,6 +59,7 @@ def main(argv):
if len(argv) == 3:
where = argv[2]
try:
process = Popen(['grep', '--exclude-dir=.svn', '--exclude-dir=.git',
'--color=never', '-HIRn', '\<%s\>' % ident, where], stdout=PIPE)
@ -87,6 +88,8 @@ def main(argv):
lines.append((line_no, content))
if len(lines) > 0:
display_lines(lines, ident)
except KeyboardInterrupt:
pass
return 0
if __name__ == '__main__':