Skip to content

Commit

Permalink
Revert "Adjust extract_section_content_from_text for dnf5"
Browse files Browse the repository at this point in the history
This reverts commit b4dba41.
  • Loading branch information
pkratoch authored and kontura committed Jan 7, 2025
1 parent f9cd636 commit 551a104
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions dnf-behave-tests/dnf/steps/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,11 @@ def extract_section_content_from_text(section_header, text):
parsed = ''
copy = False
for line in text.split('\n'):
strippedline = line.strip()
# in dnf5 there can be spaces after some section headers
# (e.g. 'Installing:', 'Upgrading:' etc.)
if (not copy) and section_header == strippedline:
if (not copy) and section_header == line:
copy = True
continue
if copy: # copy lines until hitting empty line or another known header
if strippedline and strippedline not in SECTION_HEADERS:
if line.strip() and line not in SECTION_HEADERS:
parsed += "%s\n" % line
else:
return parsed
Expand Down

0 comments on commit 551a104

Please sign in to comment.