File 0001-Fix-tests-with-python-3.4.patch of Package javapackages-tools

From ee0c9644f137d697fc598a3f7bb974787e820731 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Sun, 29 Sep 2024 10:59:57 +0200
Subject: [PATCH 1/2] Fix tests with python 3.4

---
 test/test_rpmbuild.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/test_rpmbuild.py b/test/test_rpmbuild.py
index d64e40d2..8f2d45b7 100644
--- a/test/test_rpmbuild.py
+++ b/test/test_rpmbuild.py
@@ -4,7 +4,6 @@ import re
 import sys
 import subprocess
 import shutil
-import glob
 
 from textwrap import dedent
 
@@ -101,8 +100,9 @@ class Package(object):
         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):
-- 
2.46.1

openSUSE Build Service is sponsored by