[tor-commits] [flashproxy/master] Allow an empty host in flashproxy-reg-http.py.

dcf at torproject.org dcf at torproject.org
Mon Apr 9 04:08:42 UTC 2012


commit 1566d432c78d8a2522ca37d62677002d3adc2a3e
Author: David Fifield <david at bamsoftware.com>
Date:   Sun Apr 1 10:11:36 2012 -0700

    Allow an empty host in flashproxy-reg-http.py.
---
 flashproxy-reg-http.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/flashproxy-reg-http.py b/flashproxy-reg-http.py
index 9ebaa72..8892fb2 100755
--- a/flashproxy-reg-http.py
+++ b/flashproxy-reg-http.py
@@ -7,7 +7,7 @@ import re
 import sys
 import urllib
 
-DEFAULT_REMOTE_ADDR = None
+DEFAULT_REMOTE_ADDR = ""
 DEFAULT_REMOTE_PORT = 9000
 DEFAULT_FACILITATOR_HOST = "tor-facilitator.bamsoftware.com"
 DEFAULT_FACILITATOR_PORT = 9002
@@ -61,7 +61,7 @@ def parse_addr_spec(spec, defhost = None, defport = None):
         af = 0
     host = host or defhost
     port = port or defport
-    if not (host and port):
+    if not port:
         raise ValueError("Bad address specification \"%s\"" % spec)
     return host, int(port)
 





More information about the tor-commits mailing list