equal
deleted
inserted
replaced
78 |
78 |
79 processlock = threading.Lock() |
79 processlock = threading.Lock() |
80 |
80 |
81 if sys.version_info > (3, 0, 0): |
81 if sys.version_info > (3, 0, 0): |
82 xrange = range # we use xrange in one place, and we'd rather not use range |
82 xrange = range # we use xrange in one place, and we'd rather not use range |
83 |
|
84 # subprocess._cleanup can race with any Popen.wait or Popen.poll on py24 |
|
85 # http://bugs.python.org/issue1731717 for details. We shouldn't be producing |
|
86 # zombies but it's pretty harmless even if we do. |
|
87 if sys.version_info < (2, 5): |
|
88 subprocess._cleanup = lambda: None |
|
89 |
83 |
90 def checkportisavailable(port): |
84 def checkportisavailable(port): |
91 """return true if a port seems free to bind on localhost""" |
85 """return true if a port seems free to bind on localhost""" |
92 try: |
86 try: |
93 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
87 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |