Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/
Date: Thu, 26 Feb 2015 04:12:15
Message-Id: 1420091886.9944ba53ababcf245d75f5d9c9efce07a4753033.dolsen@gentoo
1 commit: 9944ba53ababcf245d75f5d9c9efce07a4753033
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 23 04:57:05 2013 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 1 05:58:06 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=9944ba53
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('"')