| |
@@ -293,7 +293,7 @@
|
| |
def run(self):
|
| |
has_defattr = False
|
| |
for pkg in self.spec.packages:
|
| |
- if pkg.endswith('-debuginfo') or pkg.endswith('-debugsource'):
|
| |
+ if pkg.endswith(('-debuginfo', '-debugsource')):
|
| |
# auto-generated %defattr, ignore
|
| |
continue
|
| |
for line in self.spec.get_files(pkg):
|
| |
@@ -1120,7 +1120,7 @@
|
| |
if path.endswith('.src.rpm'):
|
| |
return True
|
| |
pkg = path.rsplit('-', 2)[0]
|
| |
- return pkg.endswith('-debuginfo') or pkg.endswith('-debugsource')
|
| |
+ return pkg.endswith(('-debuginfo', '-debugsource'))
|
| |
|
| |
bad_owners_by_dir = {}
|
| |
rpm_files = glob(os.path.join(Mock.resultdir, '*.rpm'))
|
| |
@@ -1132,7 +1132,7 @@
|
| |
for rpm_dir in rpm_dirs:
|
| |
if '/usr/lib/.build-id' in rpm_dir:
|
| |
continue
|
| |
- if [d for d in my_dirs if rpm_dir.startswith(d)]:
|
| |
+ if rpm_dir.startswith(tuple(my_dirs)):
|
| |
continue
|
| |
owners = set(deps.list_owners(rpm_dir))
|
| |
if owners.issubset(allowed):
|
| |
@@ -1346,7 +1346,7 @@
|
| |
for pkg in self.spec.packages:
|
| |
if self.rpms.find('*.a', pkg):
|
| |
names.append(pkg)
|
| |
- if not (pkg.endswith('-static') or pkg.endswith('-devel')):
|
| |
+ if not pkg.endswith(('-static', '-devel')):
|
| |
bad_names.append(pkg)
|
| |
rpm_pkg = self.rpms.get(pkg)
|
| |
ok = [r for r in rpm_pkg.provides if r.endswith('-static')]
|
| |
Both accept tuples of multiple things to check, instead of calling the method multiple times.