* [gentoo-commits] portage r12991 - main/branches/2.1.6/pym/portage/env
@ 2009-03-11 6:34 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-03-11 6:34 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-03-11 06:34:37 +0000 (Wed, 11 Mar 2009)
New Revision: 12991
Modified:
main/branches/2.1.6/pym/portage/env/loaders.py
Log:
Fix KeyValuePairFileLoader to only split on '=' once and strip whitespace
for keys and values. (trunk r12742)
Modified: main/branches/2.1.6/pym/portage/env/loaders.py
===================================================================
--- main/branches/2.1.6/pym/portage/env/loaders.py 2009-03-11 06:34:01 UTC (rev 12990)
+++ main/branches/2.1.6/pym/portage/env/loaders.py 2009-03-11 06:34:37 UTC (rev 12991)
@@ -268,14 +268,14 @@
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"
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-11 6:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11 6:34 [gentoo-commits] portage r12991 - main/branches/2.1.6/pym/portage/env Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox