PLCOpenEditor.py
changeset 1718 703ddaf48b00
parent 1692 9cb4d1392baf
child 1730 64d8f52bc8c8
equal deleted inserted replaced
1717:a86deec92e08 1718:703ddaf48b00
   483                     exception_locals = last_tb.tb_frame.f_locals # the locals at the level of the stack trace where the exception actually occurred
   483                     exception_locals = last_tb.tb_frame.f_locals # the locals at the level of the stack trace where the exception actually occurred
   484                     info['locals'] = format_namespace(exception_locals)
   484                     info['locals'] = format_namespace(exception_locals)
   485                     if 'self' in exception_locals:
   485                     if 'self' in exception_locals:
   486                         info['self'] = format_namespace(exception_locals['self'].__dict__)
   486                         info['self'] = format_namespace(exception_locals['self'].__dict__)
   487 
   487 
   488                 output = open(path+os.sep+"bug_report_"+info['date'].replace(':','-').replace(' ','_')+".txt",'w')
   488                 output = open(path+os.sep+"bug_report_"+time.strftime("%Y_%m_%d__%H-%M-%S")+".txt",'w')
   489                 lst = info.keys()
   489                 lst = info.keys()
   490                 lst.sort()
   490                 lst.sort()
   491                 for a in lst:
   491                 for a in lst:
   492                     output.write(a+":\n"+str(info[a])+"\n\n")
   492                     output.write(a+":\n"+str(info[a])+"\n\n")
   493 
   493