Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Porter <slug@qwebirc.org>2010-06-06 20:34:55 (GMT)
committer Chris Porter <slug@qwebirc.org>2010-06-06 20:34:55 (GMT)
commit28e24eeeb044edd4e0b117506dc94a0d3f71aa4d (patch)
treedd5efd4979b6315217bf346fab67c12b4b1c3916
parent0dad5445d010875bf793abda6acce64b7d3d627c (diff)
Another attempt at stopping that 'reactor not installed' problem with run.py.
-rwxr-xr-xrun.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/run.py b/run.py
index 2abefd6..eb21679 100755
--- a/run.py
+++ b/run.py
@@ -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: