comparison test/testemulation.py @ 371:9c95f93f5b7a

Python 3.2 compatible issues
author Windel Bouwman
date Fri, 21 Mar 2014 12:01:19 +0100
parents f86e79246602
children 68841f9ab96c
comparison
equal deleted inserted replaced
370:f86e79246602 371:9c95f93f5b7a
57 data = data.decode('ascii') 57 data = data.decode('ascii')
58 # print(data) 58 # print(data)
59 59
60 # Send quit command: 60 # Send quit command:
61 qemu_control.send("quit\n".encode('ascii')) 61 qemu_control.send("quit\n".encode('ascii'))
62 try: 62 if hasattr(subprocess, 'TimeoutExpired'):
63 p.wait(timeout=3) 63 try:
64 except subprocess.TimeoutExpired: 64 p.wait(timeout=3)
65 except subprocess.TimeoutExpired:
66 p.kill()
67 else:
68 time.sleep(2)
65 p.kill() 69 p.kill()
66 qemu_control.close() 70 qemu_control.close()
67 qemu_serial.close() 71 qemu_serial.close()
68 qemu_control_serve.close() 72 qemu_control_serve.close()
69 qemu_serial_serve.close() 73 qemu_serial_serve.close()