def parse_string(text, profile=None, **kwargs): text = dedent(text) f = StringIO(text) if profile: return parse_conf(f, profile) else: return parse_conf_stream(f, **kwargs)
def get_conf(self, profile=None, **kwargs): """ Parse stdout as a .conf file""" f = StringIO(self.stdout) if profile: return parse_conf(f, profile) else: return parse_conf_stream(f, **kwargs)