def _split(self, definition):
"""
In our YAML parameter definition line, split the key part from the value part.
:param definition: a parameter definition from our deployfish.yml
:type definition: string
:rtype: 2-tuple of strings
"""
key = definition
value = None
delimiter_loc = definition.find('=')
if delimiter_loc > 0:
key = definition[:delimiter_loc]
if len(definition) > delimiter_loc + 1:
value = definition[delimiter_loc + 1:].strip('"')
else:
value = ""
return (key, value)
评论列表
文章目录