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