def getenv(s):
    """ Convert string of key pairs to dictionary format
    :param s: str: key pairs separated by newlines
    :returns: dict: converted key pairs
    """
    results = []
    for x in s.splitlines():
        if not x:
            continue
        pair = x.split('=', 1)
        if len(pair) < 2:
            pair.append('')
        results.append(pair)
    return dict(results)