1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
Commit graph

1 commit

Author SHA1 Message Date
patchback[bot]
6070dc80d4
[PR #6837/e0324cdc backport][stable-7] rhsm_repository: refactor parsing of "subscription-manager repos" output (#6946)
rhsm_repository: refactor parsing of "subscription-manager repos" output (#6837)

Simplify a bit (and possibly speed it up a little) the parsing of the
output of `subscription-manager repos --list`:
- simplify skipping the lines that are not interesting: check the first
  character only, as it is enough to determine whether it contains
  repository data or not
- check the start of each line manually, rather than with regexp: a
  simple slice + lstrip() gives the same result

(cherry picked from commit e0324cdc90)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-07-15 16:27:12 +02:00