diff options
author | Bernard Normier <bernard@zeroc.com> | 2004-04-27 00:27:54 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2004-04-27 00:27:54 +0000 |
commit | 481b0fb1be6882ee414c34d8174c907490c184bc (patch) | |
tree | 3467485601eef2d60657227ad666b263413e78c5 /java/config/IcePackAdmin.py | |
parent | Freeze test fix + switch to popen4 to get stderr with Python on Windows (diff) | |
download | ice-481b0fb1be6882ee414c34d8174c907490c184bc.tar.bz2 ice-481b0fb1be6882ee414c34d8174c907490c184bc.tar.xz ice-481b0fb1be6882ee414c34d8174c907490c184bc.zip |
Bug fixes, in particular changed python popen calls to popen4
Diffstat (limited to 'java/config/IcePackAdmin.py')
-rw-r--r-- | java/config/IcePackAdmin.py | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/java/config/IcePackAdmin.py b/java/config/IcePackAdmin.py index 07453898874..e80f360d3ce 100644 --- a/java/config/IcePackAdmin.py +++ b/java/config/IcePackAdmin.py @@ -121,10 +121,11 @@ def shutdownIcePackRegistry(): r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \ r' -e "shutdown" ' - icePackAdminPipe = os.popen(command) + (icePackAdminPipeIn, icePackAdminPipe) = os.popen4(command) TestUtil.printOutputFromPipe(icePackAdminPipe) + icePackAdminInStatus = icePackAdminPipeIn.close() icePackAdminStatus = icePackAdminPipe.close() - if icePackAdminStatus: + if icePackAdminInStatus or icePackAdminStatus: TestUtil.killServers() sys.exit(1) print "ok" @@ -139,10 +140,11 @@ def shutdownIcePackNode(): r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \ r' -e "node shutdown localnode" ' - icePackAdminPipe = os.popen(command) + (icePackAdminPipeIn, icePackAdminPipe) = os.popen4(command) TestUtil.printOutputFromPipe(icePackAdminPipe) + icePackAdminInStatus = icePackAdminPipeIn.close() icePackAdminStatus = icePackAdminPipe.close() - if icePackAdminStatus: + if icePackAdminInStatus or icePackAdminStatus: TestUtil.killServers() sys.exit(1) print "ok" @@ -157,9 +159,11 @@ def addApplication(descriptor, targets): r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \ r' -e "application add \"' + descriptor + '\\" ' + targets + ' \"' - icePackAdminPipe = os.popen(command) + (icePackAdminPipeIn, icePackAdminPipe) = os.popen4(command) + TestUtil.printOutputFromPipe(icePackAdminPipe) + icePackAdminInStatus = icePackAdminPipeIn.close() icePackAdminStatus = icePackAdminPipe.close() - if icePackAdminStatus: + if icePackAdminInStatus or icePackAdminStatus: TestUtil.killServers() sys.exit(1) @@ -173,9 +177,12 @@ def removeApplication(descriptor): r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \ r' -e "application remove \"' + descriptor + '\\" \"' - icePackAdminPipe = os.popen(command) + + (icePackAdminPipeIn, icePackAdminPipe) = os.popen4(command) + TestUtil.printOutputFromPipe(icePackAdminPipe) + icePackAdminInStatus = icePackAdminPipeIn.close() icePackAdminStatus = icePackAdminPipe.close() - if icePackAdminStatus: + if icePackAdminInStatus or icePackAdminStatus: TestUtil.killServers() sys.exit(1) @@ -192,9 +199,11 @@ def addServer(name, serverDescriptor, server, libpath, targets): r' -e "server add localnode \"' + name + '\\" \\"' + serverDescriptor + '\\" ' + \ r' \"' + server + '\\" \\"' + libpath + '\\" ' + targets + '\"' - icePackAdminPipe = os.popen(command) + (icePackAdminPipeIn, icePackAdminPipe) = os.popen4(command) + TestUtil.printOutputFromPipe(icePackAdminPipe) + icePackAdminInStatus = icePackAdminPipeIn.close() icePackAdminStatus = icePackAdminPipe.close() - if icePackAdminStatus: + if icePackAdminInStatus or icePackAdminStatus: TestUtil.killServers() sys.exit(1) @@ -207,12 +216,14 @@ def removeServer(name): r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \ r' -e "server remove \"' + name + '\\" \"' - icePackAdminPipe = os.popen(command) + (icePackAdminPipeIn, icePackAdminPipe) = os.popen4(command) + TestUtil.printOutputFromPipe(icePackAdminPipe) + icePackAdminInStatus = icePackAdminPipeIn.close() icePackAdminStatus = icePackAdminPipe.close() - if icePackAdminStatus: + if icePackAdminInStatus or icePackAdminStatus: TestUtil.killServers() sys.exit(1) - + def startServer(name): global icePackPort @@ -222,9 +233,11 @@ def startServer(name): r' "--Ice.Default.Locator=IcePack/Locator:default -p ' + icePackPort + '" ' + \ r' -e "server start \"' + name + '\\""' - icePackAdminPipe = os.popen(command) + (icePackAdminPipeIn, icePackAdminPipe) = os.popen4(command) + TestUtil.printOutputFromPipe(icePackAdminPipe) + icePackAdminInStatus = icePackAdminPipeIn.close() icePackAdminStatus = icePackAdminPipe.close() - if icePackAdminStatus: + if icePackAdminInStatus or icePackAdminStatus: TestUtil.killServers() sys.exit(1) |