factory_flow: Ignore httplib.BadStatusLine in WaitForGoofy.

BUG=chrome-os-partner:26795
TEST=None

Change-Id: I4ad1d2756190a01a21035d8ab4d3559d4b53eaef
Reviewed-on: https://chromium-review.googlesource.com/209143
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
diff --git a/py/factory_flow/run_automated_tests.py b/py/factory_flow/run_automated_tests.py
index 916047e..5d7d0cd 100644
--- a/py/factory_flow/run_automated_tests.py
+++ b/py/factory_flow/run_automated_tests.py
@@ -314,7 +314,8 @@
       try:
         # Fetch run status on the DUT through Goofy RPC.
         run_status = goofy_proxy.GetTestRunStatus(None)
-      except (jsonrpclib.jsonrpc.ProtocolError, socket.error):
+      except (jsonrpclib.jsonrpc.ProtocolError, socket.error,
+              httplib.BadStatusLine):
         # Time out waiting for response from Goofy RPC, or the SSH connection is
         # gone.
         return False