##// END OF EJS Templates
Try to catter for exception in corner cases with some version of windows...
gvaroquaux -
Show More
@@ -50,7 +50,6 b' import subprocess'
50 50 from subprocess import PIPE
51 51 import sys
52 52 import os
53 import time
54 53 import types
55 54
56 55 try:
@@ -69,8 +68,19 b' except ImportError:'
69 68
70 69 mswindows = (sys.platform == "win32")
71 70
71 skip = False
72
72 73 if mswindows:
73 import winprocess
74 # Some versions of windows, in some strange corner cases, give
75 # errror with the killableprocess.
76 if sys.version_info[:2] > (2, 4):
77 import platform
78 if platform.uname()[3] == '' or platform.uname()[3] > '6.0.6000':
79 skip = True
80 else:
81 import winprocess
82 else:
83 skip = True
74 84 else:
75 85 import signal
76 86
@@ -78,7 +88,11 b' if not mswindows:'
78 88 def DoNothing(*args):
79 89 pass
80 90
81 class Popen(subprocess.Popen):
91
92 if skip:
93 Popen = subprocess.Popen
94 else:
95 class Popen(subprocess.Popen):
82 96 if not mswindows:
83 97 # Override __init__ to set a preexec_fn
84 98 def __init__(self, *args, **kwargs):
General Comments 0
You need to be logged in to leave comments. Login now