cwctl.py
changeset 3163 edfe43ceaa35
parent 2968 0e3460341023
parent 3117 32686ae66c75
child 3185 bd0126d17e83
--- a/cwctl.py	Wed Sep 02 16:42:07 2009 +0200
+++ b/cwctl.py	Thu Sep 10 08:13:22 2009 +0200
@@ -5,7 +5,13 @@
 %s"""
 
 import sys
-from os import remove, listdir, system, kill, getpgid, pathsep
+from os import remove, listdir, system, pathsep
+try:
+    from os import kill, getpgid
+except ImportError:
+    def kill(*args): pass
+    def getpgid(): pass
+
 from os.path import exists, join, isfile, isdir
 
 from logilab.common.clcommands import register_commands, pop_arg
@@ -24,7 +30,7 @@
     while nbtry < maxtry:
         try:
             kill(pid, signal.SIGUSR1)
-        except OSError:
+        except (OSError, AttributeError): # XXX win32
             break
         nbtry += 1
         sleep(waittime)