mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 11:48:33 +08:00
Rename _execute_cmd to not be private
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user