From d9659b0e5ac644d2cb0da8b1656ceaf461248cab Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Fri, 6 May 2005 17:48:59 +0000 Subject: [PATCH] Bug fixes in parse_spec, fix issues detecting list or string. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@652 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 5 ++++- modules/catalyst_support.py | 27 ++++++++++++++++----------- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 60e5ae27..d260fd75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.257 2005/05/05 21:16:06 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.258 2005/05/06 17:48:59 rocket Exp $ + + 06 May 2005; Eric Edgar modules/catalyst_support.py: + Bug fixes in parse_spec, fix issues detecting list or string. 05 May 2005; Eric Edgar catalyst, modules/catalyst_support.py: diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 3d741ca9..5c34e1f3 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.46 2005/05/05 21:16:06 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.47 2005/05/06 17:48:59 rocket Exp $ import sys,string,os,types,re,signal,traceback,md5,time # a function to turn a string of non-printable characters into a string of @@ -200,10 +200,11 @@ defined are not preserved. In other words, "foo", "bar", "oni" ordering is prese def parse_spec(mylines): myspec={} pos=0 - colon_optional_spaces=re.compile(":") + colon=re.compile(":") trailing_comment=re.compile("#.*\n") newline=re.compile("\n") - leading_white_space=re.compile("\s+") + leading_white_space=re.compile("^\s+") + white_space=re.compile("\s+") while pos