Utilities/BackgroundClient.py

branch
5_5_x
changeset 3741
b65577e5c8c6
parent 3591
2f2a4a76dd22
child 4021
195a471c327b
equal deleted inserted replaced
3736:2eda9afc3b14 3741:b65577e5c8c6
18 18
19 import json 19 import json
20 import socket 20 import socket
21 import struct 21 import struct
22 import sys 22 import sys
23 import time
23 import traceback 24 import traceback
24 from zlib import adler32 25 from zlib import adler32
25 26
26 27
27 class BackgroundClient(object): 28 class BackgroundClient(object):
127 tbinfo = tbinfofile.read() 128 tbinfo = tbinfofile.read()
128 del exctb 129 del exctb
129 self.__send( 130 self.__send(
130 'EXCEPTION', '?', [str(exctype), str(excval), tbinfo]) 131 'EXCEPTION', '?', [str(exctype), str(excval), tbinfo])
131 132
133 # Give time to process latest response on server side
134 time.sleep(0.5)
132 self.connection.shutdown(socket.SHUT_RDWR) 135 self.connection.shutdown(socket.SHUT_RDWR)
133 self.connection.close() 136 self.connection.close()
134 137
135 if __name__ == '__main__': 138 if __name__ == '__main__':
136 if len(sys.argv) != 3: 139 if len(sys.argv) != 3:

eric ide

mercurial