diff options
author | Chris Porter <slug@qwebirc.org> | 2010-06-06 20:34:55 (GMT) |
---|---|---|
committer | Chris Porter <slug@qwebirc.org> | 2010-06-06 20:34:55 (GMT) |
commit | 28e24eeeb044edd4e0b117506dc94a0d3f71aa4d (patch) | |
tree | dd5efd4979b6315217bf346fab67c12b4b1c3916 | |
parent | 0dad5445d010875bf793abda6acce64b7d3d627c (diff) |
Another attempt at stopping that 'reactor not installed' problem with run.py.
-rwxr-xr-x | run.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -5,11 +5,11 @@ bin.compile.vcheck() DEFAULT_PORT = 9090 -from twisted.scripts.twistd import run from optparse import OptionParser import sys, os, config def run_twistd(args1=None, args2=None): + from twisted.scripts.twistd import run args = [sys.argv[0]] if args1 is not None: args.extend(args1) @@ -57,7 +57,8 @@ if options.debug: args1.append("-b") if options.reactor != DEFAULT_REACTOR: - args1+=["--reactor", options.reactor] + rn = options.reactor + "reactor" + getattr(__import__("twisted.internet", fromlist=[rn]), rn).install() if options.logfile: args1+=["--logfile", options.logfile] if options.pidfile: |