python-blivet/0001-Fix-unknown-SAS-device-sysfs-parsing.patch

35 lines
1.4 KiB
Diff
Raw Normal View History

From 7a9697eae467fc0ed44022d948f70f30d156d69e Mon Sep 17 00:00:00 2001
From: Adam Williamson <adamw@fedoraproject.org>
Date: Fri, 11 Nov 2016 12:36:12 -0500
Subject: [PATCH] Fix "unknown" SAS device sysfs parsing.
Since the regexp matches the device type as well as the identifying
numbers, we need to pull the numbers from match groups 2 and 3, not 1
and 2.
Resolves: rhbz#1394026
Signed-off-by: Peter Jones <pjones@redhat.com>
---
blivet/devicelibs/edd.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/blivet/devicelibs/edd.py b/blivet/devicelibs/edd.py
index 7a1a1e2..51b7ed8 100644
--- a/blivet/devicelibs/edd.py
+++ b/blivet/devicelibs/edd.py
@@ -316,8 +316,8 @@ class EddEntry(object):
self.sas_address = int(sas_match.group(1), base=16)
self.sas_lun = int(sas_match.group(2), base=16)
elif unknown_match:
- self.sas_address = int(unknown_match.group(1), base=16)
- self.sas_lun = int(unknown_match.group(2), base=16)
+ self.sas_address = int(unknown_match.group(2), base=16)
+ self.sas_lun = int(unknown_match.group(3), base=16)
else:
log.warning("edd: can not match interface for %s: %s",
self.sysfspath, interface)
--
2.7.4