import re


def _parse_repos_old(module):
    """parses the output of zypper sl and returns a parse repo dictionary"""
    cmd = ['/usr/bin/zypper', 'sl']
    repos = []
    rc, stdout, stderr = module.run_command(cmd, check_rc=True)
    for line in stdout.split('\n'):
        matched = re.search(r'\d+\s+\|\s+(?P<enabled>\w+)\s+\|\s+(?P<autorefresh>\w+)\s+\|\s+(?P<type>\w+)\s+\|\s+(?P<name>\w+)\s+\|\s+(?P<url>.*)', line)
        if matched == None:
            continue

        m = matched.groupdict()
        m['alias']= m['name']
        m['priority'] = 100
        m['gpgcheck'] = 1
        repos.append(m)

    return repos