337 connection.close() |
337 connection.close() |
338 |
338 |
339 def __closeIdeConnection(self, shutdown=False): |
339 def __closeIdeConnection(self, shutdown=False): |
340 """ |
340 """ |
341 Private method to close the connection to an eric-ide. |
341 Private method to close the connection to an eric-ide. |
342 |
342 |
343 @param shutdown flag indicating a shutdown process |
343 @param shutdown flag indicating a shutdown process |
344 @type bool |
344 @type bool |
345 """ |
345 """ |
346 if self.__connection is not None: |
346 if self.__connection is not None: |
347 self.__selector.unregister(self.__connection) |
347 self.__selector.unregister(self.__connection) |
362 self.__initializeIdeSocket() |
362 self.__initializeIdeSocket() |
363 |
363 |
364 def __serviceIdeConnection(self, key): |
364 def __serviceIdeConnection(self, key): |
365 """ |
365 """ |
366 Private method to service the eric-ide connection. |
366 Private method to service the eric-ide connection. |
367 |
367 |
368 @param key reference to the SelectorKey object associated with the connection |
368 @param key reference to the SelectorKey object associated with the connection |
369 to be serviced |
369 to be serviced |
370 @type selectors.SelectorKey |
370 @type selectors.SelectorKey |
371 """ |
371 """ |
372 if key.data.name == "eric-ide": |
372 if key.data.name == "eric-ide": |
422 exctype, excval, exctb = sys.exc_info() |
422 exctype, excval, exctb = sys.exc_info() |
423 tbinfofile = io.StringIO() |
423 tbinfofile = io.StringIO() |
424 traceback.print_tb(exctb, None, tbinfofile) |
424 traceback.print_tb(exctb, None, tbinfofile) |
425 tbinfofile.seek(0) |
425 tbinfofile.seek(0) |
426 tbinfo = tbinfofile.read() |
426 tbinfo = tbinfofile.read() |
427 |
427 |
428 print(f"{str(exctype)} / {str(excval)} / {tbinfo}") |
428 print(f"{str(exctype)} / {str(excval)} / {tbinfo}") |
429 |
429 |
430 self.__shouldStop = True |
430 self.__shouldStop = True |
431 cleanExit = False |
431 cleanExit = False |
432 |
432 |