Skip to content

Commit

Permalink
Fix tests with python 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
fridrich authored and mizdebsk committed Sep 29, 2024
1 parent ef9385a commit 7f6f432
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_rpmbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import sys
import subprocess
import shutil
import glob

from textwrap import dedent

Expand Down Expand Up @@ -101,8 +100,9 @@ def __invoke_rpmbuild(self, args):
os.remove('tmperr')
# RPM 4.19 and 4.20 use different BUILD directory structure, thus we search the filesystem
# to find the actual location of build subdir without reliance on particular structure
self.buildpath = glob.glob('rpmbuild/BUILD/**/{name}-subdir'.format(name=self.__name),
recursive=True)[0]
self.buildpath = [os.path.join(dirpath, d)
for dirpath, dirnames, files in os.walk('rpmbuild/BUILD')
for d in dirnames if d.endswith('{name}-subdir'.format(name=self.__name))][0]
return (out, err, ret)

def set_env(self, name, value):
Expand Down

0 comments on commit 7f6f432

Please sign in to comment.