Make KeyValuePairFileLoader store the values as a strings instead of a lists.
authorZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:35:18 +0000 (06:35 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 11 Mar 2009 06:35:18 +0000 (06:35 -0000)
(trunk r12744)

svn path=/main/branches/2.1.6/; revision=12993

pym/portage/env/loaders.py
pym/portage/tests/env/config/test_PortageModulesFile.py

index 53566625ce31ebac05b10efc5deefa601bd1b6fb..e031ed60f80a78933cc5793cf89f59ac4cdabb5b 100644 (file)
@@ -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"
index d8938d8c5d34bfeb936956c80c5dd9a37b7a2cd2..fb164b4a7adfad6cd482fab7487180151eb9de4c 100644 (file)
@@ -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()