|
|
715401 |
From 3b0cf1b45a1cad222eb089944df5c531d6da018d Mon Sep 17 00:00:00 2001
|
|
|
715401 |
From: Ivan Devat <idevat@redhat.com>
|
|
|
715401 |
Date: Mon, 20 Apr 2020 12:22:05 +0200
|
|
|
715401 |
Subject: [PATCH 6/6] use subprocess32 instead of subprocess
|
|
|
715401 |
|
|
|
715401 |
See rhbz#1820813 for details.
|
|
|
715401 |
---
|
|
|
715401 |
pcs/cluster.py | 2 +-
|
|
|
715401 |
pcs/lib/external.py | 2 +-
|
|
|
715401 |
pcs/test/test_lib_external.py | 2 +-
|
|
|
715401 |
pcs/utils.py | 2 +-
|
|
|
715401 |
4 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
715401 |
|
|
|
715401 |
diff --git a/pcs/cluster.py b/pcs/cluster.py
|
|
|
715401 |
index e8fa0ce4..97414f83 100644
|
|
|
715401 |
--- a/pcs/cluster.py
|
|
|
715401 |
+++ b/pcs/cluster.py
|
|
|
715401 |
@@ -6,7 +6,7 @@ from __future__ import (
|
|
|
715401 |
|
|
|
715401 |
import math
|
|
|
715401 |
import os
|
|
|
715401 |
-import subprocess
|
|
|
715401 |
+import subprocess32 as subprocess
|
|
|
715401 |
import re
|
|
|
715401 |
import sys
|
|
|
715401 |
import socket
|
|
|
715401 |
diff --git a/pcs/lib/external.py b/pcs/lib/external.py
|
|
|
715401 |
index 852929b2..c399256b 100644
|
|
|
715401 |
--- a/pcs/lib/external.py
|
|
|
715401 |
+++ b/pcs/lib/external.py
|
|
|
715401 |
@@ -17,7 +17,7 @@ except ImportError:
|
|
|
715401 |
from shlex import quote as shell_quote
|
|
|
715401 |
import re
|
|
|
715401 |
import signal
|
|
|
715401 |
-import subprocess
|
|
|
715401 |
+import subprocess32 as subprocess
|
|
|
715401 |
import sys
|
|
|
715401 |
try:
|
|
|
715401 |
# python2
|
|
|
715401 |
diff --git a/pcs/test/test_lib_external.py b/pcs/test/test_lib_external.py
|
|
|
715401 |
index 827cb801..58655cc8 100644
|
|
|
715401 |
--- a/pcs/test/test_lib_external.py
|
|
|
715401 |
+++ b/pcs/test/test_lib_external.py
|
|
|
715401 |
@@ -35,7 +35,7 @@ _service = settings.service_binary
|
|
|
715401 |
_systemctl = settings.systemctl_binary
|
|
|
715401 |
|
|
|
715401 |
|
|
|
715401 |
-@mock.patch("subprocess.Popen", autospec=True)
|
|
|
715401 |
+@mock.patch("subprocess32.Popen", autospec=True)
|
|
|
715401 |
class CommandRunnerTest(TestCase):
|
|
|
715401 |
def setUp(self):
|
|
|
715401 |
self.mock_logger = mock.MagicMock(logging.Logger)
|
|
|
715401 |
diff --git a/pcs/utils.py b/pcs/utils.py
|
|
|
715401 |
index 793f0b5e..9ffc39ed 100644
|
|
|
715401 |
--- a/pcs/utils.py
|
|
|
715401 |
+++ b/pcs/utils.py
|
|
|
715401 |
@@ -6,7 +6,7 @@ from __future__ import (
|
|
|
715401 |
|
|
|
715401 |
import os
|
|
|
715401 |
import sys
|
|
|
715401 |
-import subprocess
|
|
|
715401 |
+import subprocess32 as subprocess
|
|
|
715401 |
import xml.dom.minidom
|
|
|
715401 |
from xml.dom.minidom import parseString, parse
|
|
|
715401 |
import xml.etree.ElementTree as ET
|
|
|
715401 |
--
|
|
|
715401 |
2.21.0
|
|
|
715401 |
|