From 5713ce757e755687bf52b12748297af228b4624b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 11 Mar 2009 06:35:18 +0000 Subject: [PATCH] Make KeyValuePairFileLoader store the values as a strings instead of a lists. (trunk r12744) svn path=/main/branches/2.1.6/; revision=12993 --- 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