The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/pylxd/pull/394

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
It appears that the manager.close_all() can cause a broken pipe
error.  At this stage, that means that the pipe is closed and thus
it's actually okay to just continue and ignore the error (as per stdin)

Fixes: #379
From d6979fdde4356b0edd4d92b5e20052fa32a4ec18 Mon Sep 17 00:00:00 2001
From: Alex Kavanagh <alex.kavan...@canonical.com>
Date: Thu, 23 Apr 2020 17:16:38 +0100
Subject: [PATCH] Fix broken pipe error on xenial integration tests

It appears that the manager.close_all() can cause a broken pipe
error.  At this stage, that means that the pipe is closed and thus
it's actually okay to just continue and ignore the error (as per stdin)

Fixes: #379
---
 pylxd/models/instance.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pylxd/models/instance.py b/pylxd/models/instance.py
index 12acab90..c45ec431 100644
--- a/pylxd/models/instance.py
+++ b/pylxd/models/instance.py
@@ -438,7 +438,10 @@ def execute(
 
             stdout.finish_soon()
             stderr.finish_soon()
-            manager.close_all()
+            try:
+                manager.close_all()
+            except BrokenPipeError:
+                pass
 
             while not stdout.finished or not stderr.finished:
                 time.sleep(.1)  # progma: no cover
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to