mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
Merge pull request #263 from stevekuznetsov/skuznets/command_debug
Updated some debugging statements
This commit is contained in:
commit
ced4e19743
2 changed files with 6 additions and 7 deletions
|
@ -248,7 +248,7 @@ class BuilderBase(object):
|
|||
'--define "_binary_filedigest_algorithm md5" %s %s %s %s '
|
||||
'-ba %s' % (rpmbuild_options,
|
||||
self._get_rpmbuild_dir_options(), define_dist, self._get_clean_option(), self.spec_file))
|
||||
debug(cmd)
|
||||
debug("Building RPMs with: \n%s".format(cmd))
|
||||
try:
|
||||
output = run_command_print(cmd)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
|
|
|
@ -413,12 +413,6 @@ def run_command(command, print_on_success=False):
|
|||
If command fails, print status code and command output.
|
||||
"""
|
||||
(status, output) = getstatusoutput(command)
|
||||
|
||||
# ISSUE 253 - allow for better debug output
|
||||
debug("Command: %s" % command)
|
||||
debug("Status code: %s" % status)
|
||||
debug("Command output: %s\n" % output)
|
||||
|
||||
if status > 0:
|
||||
msgs = [
|
||||
"Error running command: %s\n" % command,
|
||||
|
@ -431,6 +425,11 @@ def run_command(command, print_on_success=False):
|
|||
print("Command: %s\n" % command)
|
||||
print("Status code: %s\n" % status)
|
||||
print("Command output: %s\n" % output)
|
||||
else:
|
||||
debug("Command: %s" % command)
|
||||
debug("Status code: %s" % status)
|
||||
debug("Command output: %s\n" % output)
|
||||
|
||||
return output
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue