Blame SOURCES/0011-Issue-4978-use-more-portable-python-command-for-chec.patch

b2bc38
From 60d570e52465b58167301f64792f5f85cbc85e20 Mon Sep 17 00:00:00 2001
b2bc38
From: Mark Reynolds <mreynolds@redhat.com>
b2bc38
Date: Wed, 10 Nov 2021 08:53:45 -0500
b2bc38
Subject: [PATCH 11/12] Issue 4978 - use more portable python command for
b2bc38
 checking containers
b2bc38
b2bc38
Description:  During the installation check for containers use arguments
b2bc38
              for subprocess.run() that work on all versions of python
b2bc38
b2bc38
relates: https://github.com/389ds/389-ds-base/issues/4978
b2bc38
b2bc38
Reviewed by: mreynolds(one line commit rule)
b2bc38
---
b2bc38
 src/lib389/lib389/instance/setup.py | 2 +-
b2bc38
 1 file changed, 1 insertion(+), 1 deletion(-)
b2bc38
b2bc38
diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py
b2bc38
index 7b0147cf9..b23d2deb8 100644
b2bc38
--- a/src/lib389/lib389/instance/setup.py
b2bc38
+++ b/src/lib389/lib389/instance/setup.py
b2bc38
@@ -734,7 +734,7 @@ class SetupDs(object):
b2bc38
         # Check if we are in a container, if so don't use /dev/shm for the db home dir
b2bc38
         # as containers typically don't allocate enough space for dev/shm and we don't
b2bc38
         # want to unexpectedly break the server after an upgrade
b2bc38
-        container_result = subprocess.run(["systemd-detect-virt", "-c"], capture_output=True)
b2bc38
+        container_result = subprocess.run(["systemd-detect-virt", "-c"], stdout=subprocess.PIPE)
b2bc38
         if container_result.returncode == 0:
b2bc38
             # In a container, set the db_home_dir to the db path
b2bc38
             self.log.debug("Container detected setting db home directory to db directory.")
b2bc38
-- 
b2bc38
2.31.1
b2bc38