Fix regex to get the right Fedora versin while scanning a Fedora 25 ISO
file.
Without this patch, while trying to use a Fedora 24 ISO, the version is
set to 1 instead of 24 as the Volume id is: Fedora-WS-Live-24-1-2
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
isoinfo.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/isoinfo.py b/isoinfo.py
index 6356698..5eb68ab 100644
--- a/isoinfo.py
+++ b/isoinfo.py
@@ -119,7 +119,7 @@ iso_dir = [
('ubuntu', lambda m: m.group(2), '[Uu]buntu(-Server)? (\d+\.\d+)'),
('fedora', lambda m: m.group(1), 'Fedora[ -](\d+)'),
('fedora', lambda m: m.group(1), 'Fedora.*-(\d+)-'),
- ('fedora', lambda m: m.group(1), 'Fedora-[\w-]+-(\d+)'),
+ ('fedora', lambda m: m.group(1), 'Fedora-[\D-]+-(\d+)'),
('gentoo', lambda m: m.group(1), 'Gentoo Linux \w+ (\d+)'),
('powerkvm', 'live_cd', 'POWERKVM_LIVECD'),
('arch', lambda m: m.group(1), 'ARCH_(\d+)'),
--
2.5.5