[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #6232 [Analysis]: Make entropy-over-time graph
#6232: Make entropy-over-time graph
-------------------------+--------------------------------------------------
Reporter: arma | Owner:
Type: enhancement | Status: needs_information
Priority: normal | Milestone:
Component: Analysis | Version:
Keywords: | Parent: #6460
Points: | Actualpoints:
-------------------------+--------------------------------------------------
Comment(by atagar):
Here's a bit of an after-the-fact code review (I'm just looking at the
stem usage since I have a strong interest in making that better on my
end).
{{{
27 from stem.descriptor.server_descriptor import RelayDescriptor,
BridgeDescriptor
}}}
Import is currently unused.
{{{
66 desc_iter =
stem.descriptor.server_descriptor.parse_file(StringIO.StringIO(data))
67 desc_entries = list(desc_iter)
68 desc = desc_entries[0]
}}}
Does data include multiple descriptors or annotations (such as from
cached-descriptors)? If not then there's no reason to do this. The
parse_file() function is to make parsing descriptor _files_ easier. If you
just have a string representing a single relay then this should be
equivalent to...
{{{
desc = RelayDescriptor(data)
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6232#comment:44>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs