bwauth crash when one or more of the relay classes are not measured
This code will crash when one or more of the relay classes are not represented in 'nodes', i.e. when c_node is empty:
for cl in ["Guard+Exit", "Guard", "Exit", "Middle"]:
c_nodes = filter(lambda n: n.node_class() == cl, nodes.itervalues())
true_filt_avg[cl] = sum(map(lambda n: n.filt_bw, c_nodes))/float(len(c_node\
true_strm_avg[cl] = sum(map(lambda n: n.strm_bw, c_nodes))/float(len(c_node\
s)) true_circ_avg[cl] = sum(map(lambda n: (1.0-n.circ_fail_rate), c_nodes))/float(len(c_nodes))