use if 'x' in s instead of str.find()

It's more readable.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2017-07-26 09:29:22 +02:00 committed by Mike McLean
parent 7a3bf2791e
commit 785e23b2c0

View file

@ -1053,7 +1053,7 @@ def _check_NVRA(nvra):
def is_debuginfo(name):
"""Determines if an rpm is a debuginfo rpm, based on name"""
if name.endswith('-debuginfo') or name.endswith('-debugsource') or \
name.find('-debuginfo-') != -1:
'-debuginfo-' in name:
return True
return False