[Twisted-Python] Help, I've run and I can't fall down!
Kevin Turner
acapnotic at twistedmatrix.com
Fri Oct 12 14:48:01 EDT 2001
Okay. Someone wanna explain to me why this script prints
"Duplicate Shutdown Ignored." and sits there instead of exiting?
Ctrl-C does seem to work though:
> Starting Shutdown Sequence.
> Select loop terminated.
--
Kevin Turner <acapnotic at twistedmatrix.com> | OpenPGP encryption welcome here
The moon is waning cresent, 24.7% illuminated, 24.6 days old.
-------------- next part --------------
#!/usr/bin/env python
#$Id: fresh-loginfo.py,v 1.1 2001/10/12 17:49:04 acapnotic Exp $
import os, string, sys
from os import path
from twisted.spread import pb
from twisted.internet import main
import pidutils
TRUE=(1==1)
FALSE=not TRUE
cvs_pid = pidutils.findParentNamed('cvs')
cvsroot = os.environ['CVSROOT']
file = sys.argv[2]
module = string.split(file,'/')[0]
def connected(object):
object.trackPid(cvs_pid, cvsroot, file)
main.shutDown() # sys.exit(0)
def aint(reason):
sys.stderr.write("fresher didn't connect:\n%s\n" % (reason,))
main.shutDown() # sys.exit(1)
pb.getObjectAt("unix", path.join(cvsroot, 'CVSROOT',".freshcvs"),
connected, aint)
main.run()
More information about the Twisted-Python
mailing list