commit: 9944ba53ababcf245d75f5d9c9efce07a4753033
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 23 04:57:05 2013 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jan 1 05:58:06 2015 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=9944ba53
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('"')