720 del tblist[:1] |
720 del tblist[:1] |
721 tlist = traceback.format_list(tblist) |
721 tlist = traceback.format_list(tblist) |
722 if tlist: |
722 if tlist: |
723 tlist.insert( |
723 tlist.insert( |
724 0, "Traceback (innermost last):\n") |
724 0, "Traceback (innermost last):\n") |
725 tlist[len(tlist):] = \ |
725 tlist.extend(traceback.format_exception_only( |
726 traceback.format_exception_only( |
726 exc_type, exc_value)) |
727 exc_type, exc_value) |
|
728 finally: |
727 finally: |
729 tblist = exc_tb = None |
728 tblist = exc_tb = None |
730 |
729 |
731 self.sendJsonCommand("ClientOutput", { |
730 self.sendJsonCommand("ClientOutput", { |
732 "text": "".join(tlist) |
731 "text": "".join(tlist) |
821 |
820 |
822 elif method == "RequestWatchIgnore": |
821 elif method == "RequestWatchIgnore": |
823 wp = self.mainThread.get_watch(params["condition"]) |
822 wp = self.mainThread.get_watch(params["condition"]) |
824 if wp is not None: |
823 if wp is not None: |
825 wp.ignore = params["count"] |
824 wp.ignore = params["count"] |
826 return |
|
827 |
825 |
828 elif method == "RequestShutdown": |
826 elif method == "RequestShutdown": |
829 self.sessionClose() |
827 self.sessionClose() |
830 |
828 |
831 elif method == "RequestCompletion": |
829 elif method == "RequestCompletion": |
832 self.__completionList(params["text"]) |
830 self.__completionList(params["text"]) |
833 |
831 |
834 elif method == "RequestUTPrepare": |
832 elif method == "RequestUTPrepare": |
|
833 sys.path.insert( |
|
834 0, os.path.dirname(os.path.abspath(params["filename"]))) |
|
835 os.chdir(sys.path[0]) |
|
836 |
835 # set the system exception handling function to ensure, that |
837 # set the system exception handling function to ensure, that |
836 # we report on all unhandled exceptions |
838 # we report on all unhandled exceptions |
837 sys.excepthook = self.__unhandled_exception |
839 sys.excepthook = self.__unhandled_exception |
838 self.__interceptSignals() |
840 self.__interceptSignals() |
839 |
841 |