grepid: omit stack dump on ctrl+c
This commit is contained in:
1 parent
ef0e252883
commit
d3bb906b81
1 file changed
+3
@@ -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__':
|
||||
|
||||
Reference in new issue
Block a user