[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 3/5] Don't split values for keys including MODEL or VENDOR.
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH 3/5] Don't split values for keys including MODEL or VENDOR.
- Date: Wed, 29 Jul 2009 14:50:43 -0400
Unfortunately, these values are not necessarily enclosed in quotes but
could still include spaces. We don't want the values in our results hash
to be lists, so we need to skip splitting for some keys.
---
storage/udev.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/storage/udev.py b/storage/udev.py
index b6f6643..24b86be 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -170,7 +170,9 @@ def udev_parse_block_entry(buf):
if not sep:
continue
- if var_val.count(" "):
+ # Skip splitting for any keys matching MODEL or VENDOR, since
+ # those values could include embedded, unquoted spaces.
+ if var_val.count(" ") and var_name.find("MODEL") == -1 and var_name.find("VENDOR") == -1:
# eg: DEVLINKS
var_val = var_val.split()
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]