diff mbox series

[langdale,18/26] oeqa/utils/commands: fix usage of undefined EPIPE

Message ID d0eeb32cb0d990698287955dd7cac643bcebdafc.1680796770.git.steve@sakoman.com
State New
Headers show
Series [langdale,01/26] xdg-utils: Add a patch for CVE-2020-27748 | expand

Commit Message

Steve Sakoman April 6, 2023, 4:01 p.m. UTC
From: Enrico Jörns <ejo@pengutronix.de>

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 1cb17e37e275794e26debed2d171c2394d8bb945)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/lib/oeqa/utils/commands.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index f733fcdf3c..c03ba52ef2 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -21,6 +21,7 @@  from oeqa.utils import CommandError
 from oeqa.utils import ftools
 import re
 import contextlib
+import errno
 # Export test doesn't require bb
 try:
     import bb
@@ -85,7 +86,7 @@  class Command(object):
             except OSError as ex:
                 # It's not an error when the command does not consume all
                 # of our data. subprocess.communicate() also ignores that.
-                if ex.errno != EPIPE:
+                if ex.errno != errno.EPIPE:
                     raise
 
         # We write in a separate thread because then we can read