fix test for python 2.5
This commit is contained in:
4
test.py
4
test.py
@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import os
|
||||||
|
import signal
|
||||||
import sys
|
import sys
|
||||||
import select
|
import select
|
||||||
import struct
|
import struct
|
||||||
@ -117,7 +119,7 @@ try:
|
|||||||
finally:
|
finally:
|
||||||
for p in [p1, p2]:
|
for p in [p1, p2]:
|
||||||
try:
|
try:
|
||||||
p.kill()
|
os.kill(p.pid, signal.SIGTERM)
|
||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user