We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef9385a commit 7f6f432Copy full SHA for 7f6f432
1 file changed
test/test_rpmbuild.py
@@ -4,7 +4,6 @@
4
import sys
5
import subprocess
6
import shutil
7
-import glob
8
9
from textwrap import dedent
10
@@ -101,8 +100,9 @@ def __invoke_rpmbuild(self, args):
101
100
os.remove('tmperr')
102
# RPM 4.19 and 4.20 use different BUILD directory structure, thus we search the filesystem
103
# to find the actual location of build subdir without reliance on particular structure
104
- self.buildpath = glob.glob('rpmbuild/BUILD/**/{name}-subdir'.format(name=self.__name),
105
- 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]
106
return (out, err, ret)
107
108
def set_env(self, name, value):
0 commit comments