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

Re: [tor-bugs] #12872 [BridgeDB]: Know within which country a bridge is located



#12872: Know within which country a bridge is located
--------------------------+---------------------------------
     Reporter:  sysrqb    |      Owner:  isis
         Type:  defect    |     Status:  needs_revision
     Priority:  blocker   |  Milestone:
    Component:  BridgeDB  |    Version:
   Resolution:            |   Keywords:  bridgedb-dist, easy
Actual Points:            |  Parent ID:
       Points:            |
--------------------------+---------------------------------

Comment (by pagea):

 Replying to [comment:6 isis]:
 >  * If `ip` in L65 in geo.py is an `ipaddr.IPAddress`, then I believe
 that you'll need to pass `str(ip)`, rather than the actual class as in
 `db.country_code_by_addr(ip)`, so use `db.country_code_by_addr(str(ip))`
 insteadâ or actually `ip.compressed` or `ip.exploded` is probably safer.
 (I don't remember if `ip.__str__() == ip.compressed`.)

 `ip` is a string extracted from `IPAddress.exploded`, so
 `country_code_by_addr(ip)` works as it should. Besides that, I believe
 that I implemented all of the changes that you suggested.
 > But overall it looks excellent :D
 Thanks!

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12872#comment:8>
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