[tor-commits] [flashproxy/master] Consider "" the same as None for the host part in format_addr.
dcf at torproject.org
dcf at torproject.org
Sat Feb 8 21:00:54 UTC 2014
commit 87c154d8b69bb4a5d48c58a2de85a1f854f7a0c6
Author: David Fifield <david at bamsoftware.com>
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)
More information about the tor-commits
mailing list