From: Brian Dolbec Date: Wed, 23 Jan 2013 04:57:05 +0000 (-0800) Subject: reduce 2 operations into one simpler one X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84cb11b2809beabf4166de30f5c788d08e99e946;p=catalyst.git reduce 2 operations into one simpler one --- diff --git a/catalyst/config.py b/catalyst/config.py index b5a10879..0da1eb8e 100644 --- a/catalyst/config.py +++ b/catalyst/config.py @@ -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('"')