[tor-commits] [bridgedb/develop] Use new bridgedb.bridges.Bridge API in bridgedb.Storage.

isis at torproject.org isis at torproject.org
Thu Feb 19 02:21:14 UTC 2015


commit b7d70cde5c0fddd27551e8768d4503266455d0eb
Author: Isis Lovecruft <isis at torproject.org>
Date:   Mon Dec 22 03:42:14 2014 +0000

    Use new bridgedb.bridges.Bridge API in bridgedb.Storage.
---
 lib/bridgedb/Storage.py |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bridgedb/Storage.py b/lib/bridgedb/Storage.py
index ab0bf74..1efb139 100644
--- a/lib/bridgedb/Storage.py
+++ b/lib/bridgedb/Storage.py
@@ -175,14 +175,15 @@ class Database(object):
             # Update last_seen, address, port and (possibly) distributor.
             cur.execute("UPDATE Bridges SET address = ?, or_port = ?, "
                         "distributor = ?, last_seen = ? WHERE id = ?",
-                        (str(bridge.ip), bridge.orport, ring, timeToStr(seenAt), i))
+                        (str(bridge.address), bridge.orPort, ring,
+                         timeToStr(seenAt), i))
             return ring
         else:
             # Insert it.
             cur.execute("INSERT INTO Bridges (hex_key, address, or_port, "
                         "distributor, first_seen, last_seen) "
                         "VALUES (?, ?, ?, ?, ?, ?)",
-                        (h, str(bridge.ip), bridge.orport, setRing, t, t))
+                        (h, str(bridge.address), bridge.orPort, setRing, t, t))
             return setRing
 
     def cleanEmailedBridges(self, expireBefore):





More information about the tor-commits mailing list