Minor cleanup.

llvm-svn: 152038
This commit is contained in:
Johnny Chen 2012-03-05 18:25:29 +00:00
parent 12a8b90a36
commit 641e95de86
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,7 @@ def grep(regexp):
# At this state, we keep on accumulating lines until the separator
# is encountered. At which point, we can return the log content.
if line == separator:
log.finish()
print log.getvalue()
return
log.add_line(line)
@ -78,6 +79,7 @@ def main():
regexp = re.compile(sys.argv[1])
grep(regexp)
sys.stdin.close()
if __name__ == '__main__':
main()