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=79e360401bd6ff930f48a902a77616fc8d1f1820;p=catalyst.git reduce 2 operations into one simpler one --- diff --git a/catalyst/config.py b/catalyst/config.py index 20153357..774e2edb 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('"')