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

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 7 23:29:15 UTC 2015


#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


More information about the tor-bugs mailing list