source:
trunk/wikifiles/geni-backbone-test/nox-console.patch
@
1817
Last change on this file since 1817 was 1185, checked in by , 13 years ago | |
---|---|
File size: 936 bytes |
-
./nox/src/scripts/nox-console.py
old new 101 101 print simplejson.dumps(cmd) 102 102 sock.send(simplejson.dumps(cmd)) 103 103 if (expectReply): 104 print simplejson.dumps(simplejson.loads(sock.recv(4096)), indent=4) 104 data="" 105 while True: 106 data += sock.recv(4096) 107 try: 108 simplejson.loads(data) 109 break 110 except ValueError: 111 continue 112 113 result= simplejson.loads(data) 114 for i in result['node_id']: 115 for j in range (0, 16, 2): 116 if j == 14: 117 sys.stdout.write(i.zfill(16)[j] + "" + i.zfill(16)[j+1]) 118 else: 119 sys.stdout.write((i.zfill(16)[j])+ "" + i.zfill(16)[j+1] + ":") 120 121 sys.stdout.write("\n") 122 105 123 sock.send("{\"type\":\"disconnect\"}") 106 124 sock.shutdown(1) 107 125 sock.close()
Note: See TracBrowser
for help on using the repository browser.