[tor-bugs] #10725 [BridgeDB]: Write a Completely Spec-Compliant Bridge Descriptor Parser

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Jan 26 19:32:56 UTC 2014


#10725: Write a Completely Spec-Compliant Bridge Descriptor Parser
-----------------------------+------------------------------
     Reporter:  sysrqb       |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  normal       |  Milestone:
    Component:  BridgeDB     |    Version:
   Resolution:               |   Keywords:  bridgedb-parsers
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+------------------------------

Comment (by atagar):

 > Am I providing incorrect input?

 Yup. The descriptor classes aren't intended for direct use by users.
 Something like the following should do the trick...

 {{{
 from stem.descriptor import parse_file

 bridge_ns = parse_file(fn_ns).next()
 }}}

 The parse_file() function gives you an iterator of the descriptors in the
 file, hence the next() if it just contains one.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10725#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list