comparison xena_utils.py @ 36:d64a002c3b0c

modify
author jingchunzhu
date Fri, 24 Jul 2015 11:39:31 -0700
parents a3fbe077a14c
children
comparison
equal deleted inserted replaced
35:d8dc482ef970 36:d64a002c3b0c
39 content = response.read() 39 content = response.read()
40 except: 40 except:
41 return False 41 return False
42 42
43 return (content == "3.0") 43 return (content == "3.0")
44 """
45 query = "wget -q -O- http://%s:%s/data/'(+ 1 2)'" % (hostname, xenaPort)
46 try:
47 result = subprocess.check_output(query, shell=True)
48 except:
49 return False
50 else:
51 return(result == "3.0")
52 """
53 44
54 def findUnusedPort(): 45 def findUnusedPort():
55 """Find a random port that is available on the local system, and return 46 """Find a random port that is available on the local system, and return
56 the port number. 47 the port number.
57 """ 48 """