summaryrefslogtreecommitdiff
path: root/cpp/config/TestUtil.py
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-01-27 06:03:01 +0000
committerMarc Laukien <marc@zeroc.com>2002-01-27 06:03:01 +0000
commit2f15b4d12613a5bb9efe9fd24a4e7fafcd63e4fa (patch)
tree3cff06fa9c93f769c44ac5b108ef920d7e3aad6d /cpp/config/TestUtil.py
parentmore router starter stuff (diff)
downloadice-2f15b4d12613a5bb9efe9fd24a4e7fafcd63e4fa.tar.bz2
ice-2f15b4d12613a5bb9efe9fd24a4e7fafcd63e4fa.tar.xz
ice-2f15b4d12613a5bb9efe9fd24a4e7fafcd63e4fa.zip
started with glacier test
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r--cpp/config/TestUtil.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index 066a9a2ad77..57d364473a2 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -64,14 +64,20 @@ def killServers():
for pid in serverPids:
if sys.platform == "cygwin":
- print "killServers(): not implemented for cygwin python"
- sys.exit(1)
- if sys.platform == "win32":
- import win32api
- handle = win32api.OpenProcess(1, 0, pid)
- win32api.TerminateProcess(handle, 0)
+ print "killServers(): not implemented for cygwin python."
+ sys.exit(1)
+ elif sys.platform == "win32":
+ try:
+ import win32api
+ handle = win32api.OpenProcess(1, 0, pid)
+ win32api.TerminateProcess(handle, 0)
+ except:
+ pass # Ignore errors, such as non-existing processes.
else:
- os.kill(pid, 9)
+ try:
+ os.kill(pid, 9)
+ except:
+ pass # Ignore errors, such as non-existing processes.
serverPids = []