Handle EPIPE errors while writing to the terminal
authorIustin Pop <iustin@google.com>
Mon, 2 May 2011 11:55:21 +0000 (13:55 +0200)
committerIustin Pop <iustin@google.com>
Mon, 2 May 2011 12:41:20 +0000 (14:41 +0200)
commit225e2544c5df6e15e053307fc8a73a74ef992afc
tree86bc09158596e93c30518240ffd215bec2f74610
parent20d317d46edeb62f9ea4bdbbfda2616d74ffeb10
Handle EPIPE errors while writing to the terminal

This handles EPIPE errors in two places: ToStream (to catch logging
done in GenericMain itself) and in GenericMain (to cover also plain
print statements).

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/cli.py