diff options
author | Chris Lumens <clumens@redhat.com> | 2009-07-29 14:27:47 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-07-29 15:17:38 -0400 |
commit | 89e43a8e47c2177fd57009782b210f50e6fca1f7 (patch) | |
tree | 33b1299a2516e3030c10ae35df248eaaf88b83b1 /storage | |
parent | 530c62b7b06d9dd6be28ece348147a0f083ea5e7 (diff) | |
download | anaconda-89e43a8e47c2177fd57009782b210f50e6fca1f7.tar.gz anaconda-89e43a8e47c2177fd57009782b210f50e6fca1f7.tar.xz anaconda-89e43a8e47c2177fd57009782b210f50e6fca1f7.zip |
Don't split values for keys including MODEL or VENDOR.
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.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/udev.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/udev.py b/storage/udev.py index b6f664381..24b86be40 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() |