def get_password(csv_fname, user):
    'Get the password of user within the csv file provided.'
    root_cdk = '/root/cdk'
    tokens_fname = os.path.join(root_cdk, csv_fname)
    if (not os.path.isfile(tokens_fname)):
        return None
    with open(tokens_fname, 'r') as stream:
        for line in stream:
            record = line.split(',')
            if (record[1] == user):
                return record[0]
    return None
Get the password of user within the csv file provided.
def get_password(csv_fname, user):
    
    root_cdk = '/root/cdk'
    tokens_fname = os.path.join(root_cdk, csv_fname)
    if (not os.path.isfile(tokens_fname)):
        return None
    with open(tokens_fname, 'r') as stream:
        for line in stream:
            record = line.split(',')
            if (record[1] == user):
                return record[0]
    return None