[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Consider "" the same as None for the host part in format_addr.
commit 87c154d8b69bb4a5d48c58a2de85a1f854f7a0c6
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Sat Feb 8 13:00:05 2014 -0800
Consider "" the same as None for the host part in format_addr.
Fixes the test failure in 597d0bb6271d64ca0c3f5a26155e537ae865573b.
---
flashproxy/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/flashproxy/util.py b/flashproxy/util.py
index bf3950a..13cb5a4 100644
--- a/flashproxy/util.py
+++ b/flashproxy/util.py
@@ -105,7 +105,7 @@ def format_addr(addr):
host, port = addr
host_str = u""
port_str = u""
- if host is not None:
+ if not (host is None or host == ""):
# Numeric IPv6 address?
try:
af = addr_family(host)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits