Skip to content

Commit

Permalink
skippkg-finder.py: Handle empty configuration values properly
Browse files Browse the repository at this point in the history
Splitting an empty string with ' ' results in list(""), which the code does
not handle properly. Instead use just split() which returns an empty list()
insted.
  • Loading branch information
Vogtinator committed Jun 19, 2023
1 parent d798b51 commit df4782d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions skippkg-finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ def __init__(self, opensuse_project, sle_project, alternative_project, print_onl
# binary rpms of packages from `skippkg-finder-skiplist-ignores`
# be found in the `package_binaries` thus format must to be like
# SUSE:SLE-15:Update_libcdio.12032, PROJECT-NAME_PACKAGE-NAME
self.skiplist_ignored = set(config.get('skippkg-finder-skiplist-ignores', '').split(' '))
self.skiplist_ignored = set(config.get('skippkg-finder-skiplist-ignores', '').split())

# supplement RPMs for skipping from the ftp-tree
self.skiplist_supplement_regex = set(config.get('skippkg-finder-skiplist-supplement-regex', '').split(' '))
self.skiplist_supplement_regex = set(config.get('skippkg-finder-skiplist-supplement-regex', '').split())
# drops off RPM from a list of the supplement RPMs due to regex
self.skiplist_supplement_ignores = set(config.get('skippkg-finder-skiplist-supplement-ignores', '').split(' '))
self.skiplist_supplement_ignores = set(config.get('skippkg-finder-skiplist-supplement-ignores', '').split())
# conditional support scenario
self.skiplist_conditionals = set(config.get('skippkg-finder-conditional-scenarios', '').split(' '))
self.skiplist_conditionals = set(config.get('skippkg-finder-conditional-scenarios', '').split())

def is_sle_specific(self, package):
"""
Expand Down

0 comments on commit df4782d

Please sign in to comment.