public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] proj/catalyst:pending commit in: catalyst/
@ 2014-09-02  2:43 99% Brian Dolbec
  0 siblings, 0 replies; 1+ results
From: Brian Dolbec @ 2014-09-02  2:43 UTC (permalink / raw
  To: gentoo-commits

commit:     3bf097a6216e36e4d4a003734f8667e315867b32
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 23 04:57:05 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Sep  2 02:13:44 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=3bf097a6

reduce 2 operations into one simpler one

---
 catalyst/config.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/catalyst/config.py b/catalyst/config.py
index 460bbd5..8b23342 100644
--- a/catalyst/config.py
+++ b/catalyst/config.py
@@ -54,11 +54,7 @@ class ParserBase:
 			# Skip any blank lines
 			if not myline: continue
 
-			# Look for separator
-			msearch = myline.find(self.key_value_separator)
-
-			# If separator found assume its a new key
-			if msearch != -1:
+			if self.key_value_separator in myline:
 				# Split on the first occurence of the separator creating two strings in the array mobjs
 				mobjs = myline.split(self.key_value_separator, 1)
 				mobjs[1] = mobjs[1].strip().strip('"')


^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-09-02  2:43 99% [gentoo-commits] proj/catalyst:pending commit in: catalyst/ Brian Dolbec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox