[project][qemu] Ignore IOErrors in close

Closing a broken pipe when a test times out raises an IOError which
has the effect of masking the Timeout error indicating that the
test took too long. This prevents us from distinguishing tests that
take too long from tests that are flaky or fail for other reasons.

Test: run test that causes timeout
Bug: None
Change-Id: Idd852c22f43f1184d5d420c2788f7cd58e872118
diff --git a/project/qemu/qemu.py b/project/qemu/qemu.py
index 977afeb..d363ad4 100644
--- a/project/qemu/qemu.py
+++ b/project/qemu/qemu.py
@@ -127,10 +127,14 @@
     def close(self):
         """Close and clean up command pipes."""
-        if self.com_pipe_in:
-            self.com_pipe_in.close()
-        if self.com_pipe_out:
-            self.com_pipe_out.close()
+        def try_close(pipe):
+            try:
+                self.com_pipe_in.close()
+            except IOError as e:
+                print("close error ignored", e)
+        try_close(self.com_pipe_in)
+        try_close(self.com_pipe_out)
         # Onerror callback function to handle errors when we try to remove
         # command pipe directory, since we sleep one second if QEMU doesn't