'Parse the lines of an os-release file.
Parameters:
* lines: Iterable through the lines in the os-release file.
Each line must be a unicode string or a UTF-8 encoded byte
string.
Returns:
A dictionary containing all information items.'

@staticmethod
def _parse_os_release_content(lines):

    props = {}
    lexer = shlex.shlex(lines, posix=True)
    lexer.whitespace_split = True
    if ((sys.version_info[0] == 2) and isinstance(lexer.wordchars, bytes)):
        lexer.wordchars = lexer.wordchars.decode('iso-8859-1')
    tokens = list(lexer)
    for token in tokens:
        if ('=' in token):
            (k, v) = token.split('=', 1)
            if isinstance(v, bytes):
                v = v.decode('utf-8')
            props[k.lower()] = v
            if (k == 'VERSION'):
                codename = re.search('(\\(\\D+\\))|,(\\s+)?\\D+', v)
                if codename:
                    codename = codename.group()
                    codename = codename.strip('()')
                    codename = codename.strip(',')
                    codename = codename.strip()
                    props['codename'] = codename
                else:
                    props['codename'] = ''
        else:
            pass
    return props
