Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:pending commit in: catalyst/
Date: Tue, 02 Sep 2014 05:55:05
Message-Id: 1409637114.a7b73e18baf1bad2384e886be257d3842218c78c.dol-sen@gentoo
1 commit: a7b73e18baf1bad2384e886be257d3842218c78c
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 23 04:57:05 2013 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Tue Sep 2 05:51:54 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=a7b73e18
7
8 reduce 2 operations into one simpler one
9
10 ---
11 catalyst/config.py | 6 +-----
12 1 file changed, 1 insertion(+), 5 deletions(-)
13
14 diff --git a/catalyst/config.py b/catalyst/config.py
15 index 460bbd5..8b23342 100644
16 --- a/catalyst/config.py
17 +++ b/catalyst/config.py
18 @@ -54,11 +54,7 @@ class ParserBase:
19 # Skip any blank lines
20 if not myline: continue
21
22 - # Look for separator
23 - msearch = myline.find(self.key_value_separator)
24 -
25 - # If separator found assume its a new key
26 - if msearch != -1:
27 + if self.key_value_separator in myline:
28 # Split on the first occurence of the separator creating two strings in the array mobjs
29 mobjs = myline.split(self.key_value_separator, 1)
30 mobjs[1] = mobjs[1].strip().strip('"')