diff -r 7e61baa047f0 -r a39c2918c015 PLCOpenEditor.py --- a/PLCOpenEditor.py Mon Aug 14 23:27:15 2017 +0300 +++ b/PLCOpenEditor.py Mon Aug 14 23:34:22 2017 +0300 @@ -460,13 +460,13 @@ return '\n'.join(['%s%s: %s' % (indent, k, repr(v)[:10000]) for k, v in d.iteritems()]) -ignored_exceptions = [] # a problem with a line in a module is only reported once per session - - -def AddExceptHook(path, app_version='[No version]'):#, ignored_exceptions=[]): +ignored_exceptions = [] # a problem with a line in a module is only reported once per session + + +def AddExceptHook(path, app_version='[No version]'): #, ignored_exceptions=[]): def handle_exception(e_type, e_value, e_traceback): - traceback.print_exception(e_type, e_value, e_traceback) # this is very helpful when there's an exception in the rest of this func + traceback.print_exception(e_type, e_value, e_traceback) # this is very helpful when there's an exception in the rest of this func last_tb = get_last_traceback(e_traceback) ex = (last_tb.tb_frame.f_code.co_filename, last_tb.tb_frame.f_lineno) if str(e_value).startswith("!!!"): @@ -476,11 +476,11 @@ if result: ignored_exceptions.append(ex) info = { - 'app-title' : wx.GetApp().GetAppName(), # app_title + 'app-title' : wx.GetApp().GetAppName(), # app_title 'app-version' : app_version, 'wx-version' : wx.VERSION_STRING, 'wx-platform' : wx.Platform, - 'python-version' : platform.python_version(), #sys.version.split()[0], + 'python-version' : platform.python_version(), #sys.version.split()[0], 'platform' : platform.platform(), 'e-type' : e_type, 'e-value' : e_value, @@ -490,7 +490,7 @@ if e_traceback: info['traceback'] = ''.join(traceback.format_tb(e_traceback)) + '%s: %s' % (e_type, e_value) last_tb = get_last_traceback(e_traceback) - exception_locals = last_tb.tb_frame.f_locals # the locals at the level of the stack trace where the exception actually occurred + exception_locals = last_tb.tb_frame.f_locals # the locals at the level of the stack trace where the exception actually occurred info['locals'] = format_namespace(exception_locals) if 'self' in exception_locals: info['self'] = format_namespace(exception_locals['self'].__dict__)