grepid: omit stack dump on ctrl+c
This commit is contained in:
parent
ef0e252883
commit
d3bb906b81
3
grepid
3
grepid
@ -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__':
|
||||
|
Loading…
x
Reference in New Issue
Block a user