eric7/Utilities/BackgroundClient.py

branch
eric7
changeset 8649
01eb78cba360
parent 8468
57ed532d4cde
child 8881
54e42bc2437a
equal deleted inserted replaced
8648:c908f66b9d19 8649:01eb78cba360
207 'EXCEPTION', '?', [str(exctype), str(excval), tbinfo]) 207 'EXCEPTION', '?', [str(exctype), str(excval), tbinfo])
208 208
209 finally: 209 finally:
210 # Give time to process latest response on server side 210 # Give time to process latest response on server side
211 time.sleep(0.5) 211 time.sleep(0.5)
212 self.connection.shutdown(socket.SHUT_RDWR) 212 with contextlib.suppress(OSError):
213 self.connection.close() 213 self.connection.shutdown(socket.SHUT_RDWR)
214 self.connection.close()
214 215
215 if __name__ == '__main__': 216 if __name__ == '__main__':
216 if len(sys.argv) != 5: 217 if len(sys.argv) != 5:
217 print('Host, port, max. processes and Python library path parameters' 218 print('Host, port, max. processes and Python library path parameters'
218 ' are missing. Aborting...') 219 ' are missing. Aborting...')

eric ide

mercurial