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...') |