[Zodb-checkins] CVS: ZODB3/zdaemon - zdctl.py:1.5
Guido van Rossum
guido@python.org
Tue, 26 Nov 2002 12:54:31 -0500
Update of /cvs-repository/ZODB3/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv25056
Modified Files:
zdctl.py
Log Message:
Remove some debug prints, and tweaked other status output a bit.
=== ZODB3/zdaemon/zdctl.py 1.4 => 1.5 ===
--- ZODB3/zdaemon/zdctl.py:1.4 Tue Nov 26 12:34:34 2002
+++ ZODB3/zdaemon/zdctl.py Tue Nov 26 12:54:30 2002
@@ -83,10 +83,9 @@
prompt = "(zdctl) "
def __init__(self, options):
- print "program:", " ".join(options.program)
self.options = options
cmd.Cmd.__init__(self)
- self.do_status()
+ self.get_status()
if self.zd_status:
m = re.search("(?m)^args=(.*)$", self.zd_status)
if m:
@@ -114,7 +113,6 @@
break
response += data
sock.close()
- print "response =", `response`
return response
except socket.error, msg:
return None
@@ -166,7 +164,6 @@
if self.options.user:
argss.extend(["-u", str(self.options.user)])
args.extend(self.options.program)
- print args
os.spawnvp(os.P_WAIT, args[0], args)
else:
self.send_action("start")
@@ -252,7 +249,9 @@
def do_quit(self, arg):
self.get_status()
- if not self.zd_pid:
+ if not self.zd_up:
+ print "daemon manager not running"
+ elif not self.zd_pid:
print "daemon process not running; stopping daemon manager"
self.send_action("exit")
self.awhile(lambda: not self.zd_up, "daemon manager stopped")
@@ -271,6 +270,8 @@
if options.args:
c.onecmd(" ".join(options.args))
else:
+ print "program:", " ".join(options.program)
+ c.do_status()
c.cmdloop()
if __name__ == "__main__":