From 2f15b4d12613a5bb9efe9fd24a4e7fafcd63e4fa Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Sun, 27 Jan 2002 06:03:01 +0000 Subject: started with glacier test --- cpp/config/TestUtil.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'cpp/config/TestUtil.py') 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 = [] -- cgit v1.2.3