Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion kiwi/command_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with kiwi. If not, see <http://www.gnu.org/licenses/>
#
import os
import logging
from collections import namedtuple
from kiwi.command import CommandCallT
Expand Down Expand Up @@ -112,7 +113,8 @@ def poll_and_watch(self):
)
if error_output:
log.debug('--------------err start-------------')
log.debug(error_output)
for line in error_output.split(os.linesep):
log.debug(line)
log.debug('--------------err stop--------------')
return result(
stderr=error_output, returncode=error_code
Expand Down Expand Up @@ -197,6 +199,7 @@ def __next__(self) -> PollT:
elif byte_read == bytes(b'\n'):
line_stderr = Codec.decode(self.command_error_line)
self.command_error_line = bytes(b'')
self.command_error_output += byte_read
else:
self.command_error_line += byte_read
self.command_error_output += byte_read
Expand Down
2 changes: 1 addition & 1 deletion test/unit/command_process_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_poll_and_watch(self, mock_command):
assert '--------------out start-------------' in self._caplog.text
assert 'data' in self._caplog.text
assert '--------------out stop--------------' in self._caplog.text
assert result.stderr == 'error'
assert result.stderr == 'error\n'

@patch('kiwi.command.Command')
def test_create_match_method(self, mock_command):
Expand Down