##// 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 from subprocess import PIPE
50 from subprocess import PIPE
51 import sys
51 import sys
52 import os
52 import os
53 import time
54 import types
53 import types
55
54
56 try:
55 try:
@@ -69,15 +68,30 b' except ImportError:'
69
68
70 mswindows = (sys.platform == "win32")
69 mswindows = (sys.platform == "win32")
71
70
71 skip = False
72
72 if mswindows:
73 if mswindows:
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:
73 import winprocess
81 import winprocess
74 else:
82 else:
83 skip = True
84 else:
75 import signal
85 import signal
76
86
77 if not mswindows:
87 if not mswindows:
78 def DoNothing(*args):
88 def DoNothing(*args):
79 pass
89 pass
80
90
91
92 if skip:
93 Popen = subprocess.Popen
94 else:
81 class Popen(subprocess.Popen):
95 class Popen(subprocess.Popen):
82 if not mswindows:
96 if not mswindows:
83 # Override __init__ to set a preexec_fn
97 # Override __init__ to set a preexec_fn
General Comments 0
You need to be logged in to leave comments. Login now