On Wed, 4 Sep 2019 at 14:55, Quentin Schulz < quentin.schulz@streamunlimited.com> wrote: > So we just need to invert the logic actually. > > matched = False > for pattern in private_libs: > if fnmatch.fnmatch(this_soname, pattern)]) == 0: > matched = True > break > > if not matched: > sonames.add(prov) > I think you are looking for the "for...else" feature in Python :) Still, the original code is not adding any lines at all while yours adds eight so I'd just keep the patch as it is. Alex