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

[tor-commits] [bridgedb/master] Revert change in addressClass check in filterBridgesByTransport().



commit 3ef37df6ca94679ff3b76df6a713231d5e7b4f21
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Mon Mar 23 02:02:49 2015 +0000

    Revert change in addressClass check in filterBridgesByTransport().
    
    The `addressClass` passed to `filterBridgesByTransport()` is either
    `ipaddr.IPv4Address` or `ipaddr.IPv6Address`, not an instance of either.
    
     * REVERT a change to filterBridgesByTransport made in adb67e64.
---
 lib/bridgedb/Filters.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bridgedb/Filters.py b/lib/bridgedb/Filters.py
index d96d3ec..b857967 100644
--- a/lib/bridgedb/Filters.py
+++ b/lib/bridgedb/Filters.py
@@ -74,7 +74,7 @@ def filterBridgesByIP6(bridge):
 setattr(filterBridgesByIP6, "description", "ip=6")
 
 def filterBridgesByTransport(methodname, addressClass=None):
-    if not isinstance(addressClass, (IPv6Address, IPv4Address)):
+    if not ((addressClass is IPv4Address) or (addressClass is IPv6Address)):
         addressClass = IPv4Address
 
     ruleset = frozenset([methodname, addressClass])



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits