commit fbf164eb542e4d9a29ab66a3abd37ed588ba43cc Author: David Fifield david@bamsoftware.com Date: Wed May 2 13:54:18 2012 -0700
Look for flashproxy-reg-http.py in the same directory as connector.py. --- connector.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/connector.py b/connector.py index 3e2bfd9..8a2b7e1 100755 --- a/connector.py +++ b/connector.py @@ -605,8 +605,13 @@ def register(): if not options.register: return
+ # sys.path[0] is initialized to the directory containing the Python script file. + script_dir = sys.path[0] + if not script_dir: + # Maybe the script was read from stdin; in any case don't guess at the directory. + return + command = [os.path.join(script_dir, "flashproxy-reg-http.py")] spec = format_addr((None, options.remote_addr[1])) - command = ["./flashproxy-reg-http.py"] if options.facilitator_addr is None: log(u"Registering "%s"." % spec) else: