reduce 2 operations into one simpler one
authorBrian Dolbec <dolsen@gentoo.org>
Wed, 23 Jan 2013 04:57:05 +0000 (20:57 -0800)
committerW. Trevor King <wking@tremily.us>
Sun, 15 Dec 2013 04:25:06 +0000 (20:25 -0800)
catalyst/config.py

index b5a108794d8852cf4a1ac934397f1115c9514b5b..0da1eb8e2191fa2951de127739c16612f931272c 100644 (file)
@@ -55,11 +55,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('"')