#NEWLINE# def get_items_for_client( tiids , myrefsets , myredis , most_recent_metric_date = None , most_recent_diff_metric_date = None ) : #NEWLINE# #INDENT# item_metric_dicts = get_readonly_item_metric_dicts ( tiids , most_recent_metric_date , most_recent_diff_metric_date ) #NEWLINE# dict_of_item_docs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for tiid in item_metric_dicts : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# item_doc_for_client = item_module . build_item_for_client ( tiid [ tiid ] , myrefsets , myredis ) #NEWLINE# dict_of_item_docs [ tiid ] = item_doc_for_client #NEWLINE# #UNINDENT# except ( KeyError , TypeError , AttributeError ) : #NEWLINE# #INDENT# logger . info ( "Couldn't build item {tiid}" . format ( tiid = tiid ) ) #NEWLINE# raise #NEWLINE# #UNINDENT# #UNINDENT# return dict_of_item_docs