未验证 提交 1d1d52fa 编写于 作者: R Rudá Moura

Make use of python-subprocess32 module if available.

python-subprocess32 [https://code.google.com/p/python-subprocess32/]
is a backport of Python 3.2 subprocess module with:

* Better process forking.
* More reliable when running with threads.

Although we're not going to use any feature of subprocess32,
this change turn it possible to use subprocess32 as a drop-in
replacement for the original subprocess module.
Signed-off-by: NRudá Moura <rmoura@redhat.com>
上级 2540234c
......@@ -264,12 +264,16 @@ if __name__ == "__main__":
# The following is the client part of the module.
import subprocess
import time
import signal
import re
import threading
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
from avocado.utils import astring
from avocado.utils import data_factory
from avocado.utils import io
......
......@@ -25,7 +25,11 @@ import fcntl
import socket
import tempfile
import commands
import subprocess
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
from avocado.utils import network
from avocado.external import gdbmi_parser
......
......@@ -16,9 +16,13 @@ import gzip
import logging
import os
import shutil
import subprocess
import time
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
from avocado import utils
from avocado.linux import software_manager
from avocado.core import output
......
......@@ -20,13 +20,19 @@ import logging
import os
import StringIO
import signal
import subprocess
import time
import stat
import shlex
import shutil
import threading
try:
import subprocess32 as subprocess
SUBPROCESS32_SUPPORT = True
except ImportError:
import subprocess
SUBPROCESS32_SUPPORT = False
from avocado import gdb
from avocado import runtime
from avocado.core import exceptions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册