#NEWLINE# def get_cluster_or_404( id ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# name = id #NEWLINE# cluster = CLUSTERS . get ( ) [ name ] #NEWLINE# #UNINDENT# except ( TypeError , ValueError ) : #NEWLINE# #INDENT# raise Http404 ( ) #NEWLINE# #UNINDENT# cluster = { #NEWLINE# #INDENT# 'id' : id , #NEWLINE# 'nice_name' : id , #NEWLINE# 'host_ports' : cluster . HOST_PORTS . get ( ) , #NEWLINE# 'rest_url' : cluster . REST_URL . get ( ) , #NEWLINE# #UNINDENT# } #NEWLINE# return cluster