diff options
author | Martin Gracik <mgracik@redhat.com> | 2010-02-02 19:43:00 +0100 |
---|---|---|
committer | Martin Gracik <mgracik@redhat.com> | 2010-02-03 10:13:04 +0100 |
commit | 6217d83bb4958e31142e16b95387f8f0f8bb3761 (patch) | |
tree | 8c61e1d865dfea19dc5ab29f60ffb462310e351d | |
parent | e999fffb497765ab3044aea180c9cf06de2ac37b (diff) | |
download | anaconda-6217d83bb4958e31142e16b95387f8f0f8bb3761.tar.gz anaconda-6217d83bb4958e31142e16b95387f8f0f8bb3761.tar.xz anaconda-6217d83bb4958e31142e16b95387f8f0f8bb3761.zip |
Fixed parsing of strings with multiple values in pyudev
Some of the values which are returned by udev are strings,
which contain more values for the same key.
The string format is "val1 key=val2 key=val3 ...".
This fix makes sure we split this string into a list of values.
-rw-r--r-- | pyudev.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -145,6 +145,11 @@ class UdevDevice(dict): name = libudev_udev_list_entry_get_name(property_entry) value = libudev_udev_list_entry_get_value(property_entry) + # XXX some of the strings contain a list of values in them, + # we want to split them and make a list + if value.count(" %s=" % name): + value = value.split(" %s=" % name) + self[name] = value # get next property entry |