diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-02 23:51:12 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-02 23:51:12 +0000 |
commit | 51e6b1909a267810fe01e0303bbb88d68b36af15 (patch) | |
tree | 2ba12ac3542631fbaca63464246a8b9f2a848daf | |
parent | 8fd947cb95f0d9a7b517e5d2feb7bda5b9417c86 (diff) | |
download | portage-51e6b1909a267810fe01e0303bbb88d68b36af15.tar.gz portage-51e6b1909a267810fe01e0303bbb88d68b36af15.tar.bz2 portage-51e6b1909a267810fe01e0303bbb88d68b36af15.zip |
Fix KeyValuePairFileLoader to only split on '=' once and strip whitespace
for keys and values.
svn path=/main/trunk/; revision=12742
-rw-r--r-- | pym/portage/env/loaders.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/env/loaders.py b/pym/portage/env/loaders.py index b23c7f393..53566625c 100644 --- a/pym/portage/env/loaders.py +++ b/pym/portage/env/loaders.py @@ -268,14 +268,14 @@ class KeyValuePairFileLoader(FileLoader): return if not len(line): # skip empty lines return - split = line.split('=') + split = line.split('=', 1) if len(split) < 2: errors.setdefault(self.fname, []).append( "Malformed data at line: %s, data %s" % (line_num + 1, line)) return - key = split[0] - value = split[1:] + key = split[0].strip() + value = split[1].split() if not key: errors.setdefault(self.fname, []).append( "Malformed key at line: %s, key %s" |