This commit is contained in:
meejah 2022-09-18 22:39:25 -06:00
parent 254a994eb5
commit fe80126e3f
3 changed files with 5 additions and 2 deletions

View File

@ -267,7 +267,7 @@ def run(reactor, config, runApp=twistd.runApp):
try:
check_pid_process(pidfile)
except (ProcessInTheWay, InvalidPidFile) as e:
print("ERROR: {}".format(e))
print("ERROR: {}".format(e), file=err)
return 1
else:
reactor.addSystemEventTrigger(

View File

@ -168,8 +168,10 @@ class RunTests(SyncTestCase):
config['basedir'] = basedir.path
config.twistd_args = []
from twisted.internet import reactor
runs = []
result_code = run(config, runApp=runs.append)
result_code = run(reactor, config, runApp=runs.append)
self.assertThat(
config.stderr.getvalue(),
Contains("found invalid PID file in"),

View File

@ -145,6 +145,7 @@ def run_cli_native(verb, *args, **kwargs):
)
d.addCallback(
runner.dispatch,
reactor,
stdin=stdin,
stdout=stdout,
stderr=stderr,