From da83354a97a148ce3bd4342744d54190c0bfdac1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 30 May 2014 15:03:24 -0400 Subject: [PATCH] Fix pyghmicons script crash on idle After 10 minutes of idle, the wrong exception was caught. Correct it to correctly handle errno 11 Change-Id: I91feea97c3442dec1fc30bd813e99da05a1ef329 --- bin/pyghmicons | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/pyghmicons b/bin/pyghmicons index 1130d7cf..4801fb0d 100755 --- a/bin/pyghmicons +++ b/bin/pyghmicons @@ -50,8 +50,9 @@ def _doinput(): select.select((sys.stdin,), (), (), 600) try: data = sys.stdin.read() - except OSError: - continue + except (IOError, OSError) as e: + if e.errno == 11: + continue sol.send_data(data)