[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs