From 9e2702ab16e051bfc7ef03748bb5fdf8ce10a816 Mon Sep 17 00:00:00 2001 From: Sven Velt Date: Thu, 26 Aug 2010 13:44:40 +0200 Subject: [PATCH] Fix for Python 2.5 Signed-off-by: Sven Velt --- nagixsc/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nagixsc/__init__.py b/nagixsc/__init__.py index 644c9ab..182e733 100644 --- a/nagixsc/__init__.py +++ b/nagixsc/__init__.py @@ -99,7 +99,10 @@ def exec_check(host_name, service_descr, cmdline, timeout=None, timeout_returnco if timeout: signal.alarm(0) try: - cmd.terminate() + if sys.version_info >= (2, 6): + cmd.terminate() + else: + os.kill(cmd.pid, 15) except OSError: pass -- 2.30.2