avocado.settings: Remove method we're not going to use now

I thought it'd be useful right away, but turns out we
can wait to add it, should the need arise.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 7c229388
......@@ -123,23 +123,5 @@ class Settings(object):
return convert_value_type(key, section, val, key_type)
def get_section_values(self, sections):
"""
Return a config parser object containing a single section of the
global configuration, that can be later written to a file object.
:param section: Tuple with sections we want to turn into a config parser
object.
:return: ConfigParser() object containing all the contents of sections.
"""
if isinstance(sections, str):
sections = [sections]
cfgparser = ConfigParser.ConfigParser()
for section in sections:
cfgparser.add_section(section)
for option, value in self.config.items(section):
cfgparser.set(section, option, value)
return cfgparser
settings = Settings()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册