[PATCH 4/9] Fix efi_product_path regex (#728007)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/bootloader.py |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 6447c86..44fdb5a 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1312,15 +1312,11 @@ class EFIGRUB(GRUB):
 
             eg: HD(1,800,64000,faacb4ef-e361-455e-bd97-ca33632550c3)
         """
-        path = ""
         buf = self.efibootmgr("-v", stderr="/dev/tty5", capture=True)
-        matches = re.search(productName + r'\s+HD\(.+?\)', buf)
-        if matches:
-            path = re.sub(productName + r'\s+',
-                          '',
-                          buf[matches[0].start():matches[0].end()])
-
-        return path
+        matches = re.search(productName + r'\s+(HD\(.+?\))', buf)
+        if matches and matches.groups():
+            return matches.group(1)
+        return ""
 
     @property
     def grub_conf_device_line(self):
-- 
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux