tests/pydevtest/lib_pre410.py
def open_and_load_pre410_env_file(filename):
    '''
    A very brittle parsing takes place here:
    Each line of .irodsEnv is split into tokens.
    If the first token matches a key in our old-new setting map
    we use the corresponding json setting, and the second token as value
    '''
    irods_env = {}
    with open(filename) as env_file:
        for line in env_file.readlines():
            tokens = line.strip().split()
            if len(tokens) > 1 and tokens[0] in json_env_map:
                irods_env[json_env_map[tokens[0]]] = tokens[1]

    return irods_env

    A very brittle parsing takes place here:
    Each line of .irodsEnv is split into tokens.
    If the first token matches a key in our old-new setting map
    we use the corresponding json setting, and the second token as value
    
A very brittle parsing takes place here:
Each line of .irodsEnv is split into tokens.
If the first token matches a key in our old-new setting map
we use the corresponding json setting, and the second token as value
A very brittle parsing takes place here : Each line of . irodsEnv is split into tokens . If the first token matches a key in our old - new setting map we use the corresponding json setting and the second token as value
def open_and_load_pre410_env_file(filename):
    irods_env = {}
    with open(filename) as env_file:
        for line in env_file.readlines():
            tokens = line.strip().split()
            if len(tokens) > 1 and tokens[0] in json_env_map:
                irods_env[json_env_map[tokens[0]]] = tokens[1]
    return irods_env
def open_and_load_pre410_env_file ( filename ) : irods_env = { } with open ( filename ) as env_file : for line in env_file . readlines ( ) : tokens = line . strip ( ) . split ( ) if len ( tokens ) > 1 and tokens [ 0 ] in json_env_map : irods_env [ json_env_map [ tokens [ 0 ] ] ] = tokens [ 1 ] return irods_env
A very brittle parsing takes place here:
Each line of .irodsEnv is split into tokens.
A very brittle parsing takes place here : Each line of . irodsEnv is split into tokens .
'''
    A very brittle parsing takes place here:
    Each line of .irodsEnv is split into tokens.
    If the first token matches a key in our old-new setting map
    we use the corresponding json setting, and the second token as value
    '''
filename