jsharkey/android-tools — pull request #1 by benvd (2014-02-03 09:48:52+00:00)
Title: Do not get terminal dimensions when we're piping to someone

When piping to someone else, the following crash occurred:

Traceback (most recent call last):
File "./coloredlogcat.py", line 46, in
data = fcntl.ioctl(sys.stdout.fileno(), termios.TIOCGWINSZ, '1234')
IOError: [Errno 25] Inappropriate ioctl for device

This commit fixes that, and allows redirecting the output of coloredlogcat. Useful to, for instance, grep for a specific tag.