# -*- encoding: utf-8 -*-
from esipy import App
from esipy import EsiClient
from esipy.exceptions import APIException
from collections import OrderedDict

def process_resp(esiapp, esiclient, resp):
    assert (resp.status == 200)
    fit_list = {}
    for fit in resp.data:
        
        op = esiapp.op['get_universe_types_type_id'](
            type_id=fit.ship_type_id
        )
        resp = esiclient.request(op)
        if resp.status != 200:
            raise APIException('', resp.status, resp.data)
        print resp.data.name
        if resp.data.name in fit_list:
            fit_list[resp.data.name] += fit
        else:
            fit_list = [fit]
    
    return OrderedDict(sorted(ship_list.items(), key=lambda t: t[0]))
        

@@ -516,154 +516,76 @@
     
-print resp.data.name%0A        if resp.data.name in fit_list:%0A            fit_list%5Bresp.data.name%5D += fit%0A        else:%0A            fit_list = %5Bfit%5D
+fit_list.get(resp.data.name, %5B%5D) += fit%0A        print resp.data.name
 %0A   

use get