reduce 2 operations into one simpler one
authorBrian Dolbec <dolsen@gentoo.org>
Wed, 23 Jan 2013 04:57:05 +0000 (20:57 -0800)
committerBrian Dolbec <dolsen@gentoo.org>
Sat, 2 Mar 2013 02:27:25 +0000 (18:27 -0800)
catalyst/config.py

index 201533576fff0fa041f0654a0f3935fad4287806..774e2edb9dd0b01a555762fb08b96df4b5262bc6 100644 (file)
@@ -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('"')