andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 4 months ago
Clone

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

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