Rename _execute_cmd to not be private

This commit is contained in:
Jakub Kadlčík
2017-04-03 20:46:30 +02:00
parent a4a3f1734d
commit 18502030f2
2 changed files with 8 additions and 8 deletions

View File

@@ -37,7 +37,7 @@ import module_build_service.scheduler
import module_build_service.scheduler.consumer
from base import GenericBuilder
from utils import _execute_cmd, build_from_scm
from utils import execute_cmd, build_from_scm
from KojiModuleBuilder import KojiModuleBuilder
logging.basicConfig(level=logging.DEBUG)
@@ -323,14 +323,14 @@ mdpolicy=group:primary
try:
# Initialize mock.
_execute_cmd(["mock", "-v", "-r", mock_config, "--init"],
stdout=mock_stdout_log, stderr=mock_stderr_log)
execute_cmd(["mock", "-v", "-r", mock_config, "--init"],
stdout=mock_stdout_log, stderr=mock_stderr_log)
# Start the build and store results to resultsdir
_execute_cmd(["mock", "-v", "-r", mock_config,
execute_cmd(["mock", "-v", "-r", mock_config,
"--no-clean", "--rebuild", source,
"--resultdir=%s" % resultsdir],
stdout=mock_stdout_log, stderr=mock_stderr_log)
stdout=mock_stdout_log, stderr=mock_stderr_log)
# Emit messages simulating complete build. These messages
# are put in the scheduler's work queue and are handled

View File

@@ -38,8 +38,8 @@ def build_from_scm(artifact_name, source, config, build_srpm,
# Use configured command to create SRPM out of the SCM repo.
log.debug("Creating SRPM in %s" % cod)
_execute_cmd(config.mock_build_srpm_cmd.split(" "),
stdout=stdout, stderr=stderr, cwd=cod)
execute_cmd(config.mock_build_srpm_cmd.split(" "),
stdout=stdout, stderr=stderr, cwd=cod)
# Find out the built SRPM and build it normally.
for f in os.listdir(cod):
@@ -64,7 +64,7 @@ def build_from_scm(artifact_name, source, config, build_srpm,
return ret
def _execute_cmd(args, stdout = None, stderr = None, cwd = None):
def execute_cmd(args, stdout = None, stderr = None, cwd = None):
"""
Executes command defined by `args`. If `stdout` or `stderr` is set to
Python file object, the stderr/stdout output is redirecter to that file.