]> git.proxmox.com Git - efi-boot-shim.git/commitdiff
Use popen for lsb_release
authorBastien Roucariès <rouca@debian.org>
Mon, 15 Apr 2024 14:54:14 +0000 (14:54 +0000)
committerBastien Roucariès <rouca@debian.org>
Mon, 15 Apr 2024 14:54:14 +0000 (14:54 +0000)
debian/tests/uefi_tests_base.py

index f007d741521296917cc10fa15101734812b2bb8c..7a5958942e5f6031fd5bc8ba8bf1df2e234e89f9 100644 (file)
@@ -16,7 +16,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-import lsb_release
 import os
 import shutil
 import stat
@@ -169,7 +168,8 @@ class UEFIVirtualMachine(UEFITestsBase):
         self.autopkgtest_dir = tempfile.TemporaryDirectory()
         os.makedirs(os.path.join(self.autopkgtest_dir.name, 'img'))
         self.arch = arch
-        self.release = lsb_release.get_os_release()['CODENAME']
+        release = subprocess.run(['lsb_release','-c','-s'], capture_output=True, check=True)
+        self.release = release.stdout
         self.path = tempfile.mkstemp(dir=self.autopkgtest_dir.name)[1]
         if not base:
             subprocess.run(['wget',