From a517752edabe43a429ea4687d0fbb7516645ac1d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 3 Mar 2009 03:39:57 +0000 Subject: [PATCH] Make KeyValuePairFileLoader store the values as a strings instead of a lists. svn path=/main/trunk/; revision=12744 --- pym/portage/env/loaders.py | 2 +- pym/portage/tests/env/config/test_PortageModulesFile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage/env/loaders.py b/pym/portage/env/loaders.py index 53566625c..e031ed60f 100644 --- a/pym/portage/env/loaders.py +++ b/pym/portage/env/loaders.py @@ -275,7 +275,7 @@ class KeyValuePairFileLoader(FileLoader): % (line_num + 1, line)) return key = split[0].strip() - value = split[1].split() + value = split[1].strip() if not key: errors.setdefault(self.fname, []).append( "Malformed key at line: %s, key %s" diff --git a/pym/portage/tests/env/config/test_PortageModulesFile.py b/pym/portage/tests/env/config/test_PortageModulesFile.py index d8938d8c5..fb164b4a7 100644 --- a/pym/portage/tests/env/config/test_PortageModulesFile.py +++ b/pym/portage/tests/env/config/test_PortageModulesFile.py @@ -22,7 +22,7 @@ class PortageModulesFileTestCase(TestCase): f = PortageModulesFile(self.fname) f.load() for k in self.keys: - self.assertEqual(f[k], [self.items[k]]) + self.assertEqual(f[k], self.items[k]) for ik in self.invalid_keys: self.assertEqual(False, ik in f) self.NukeFile() -- 2.26.2