eric6/eric6.py

changeset 7729
f2f7b7b24879
parent 7635
0cdead130a81
child 7759
51aa6c6b66f7
equal deleted inserted replaced
7728:a233627a5e25 7729:f2f7b7b24879
183 183
184 versionInfo = "\n{0}\n{1}".format( 184 versionInfo = "\n{0}\n{1}".format(
185 separator, Utilities.generateVersionInfo()) 185 separator, Utilities.generateVersionInfo())
186 pluginVersionInfo = Utilities.generatePluginsVersionInfo() 186 pluginVersionInfo = Utilities.generatePluginsVersionInfo()
187 if pluginVersionInfo: 187 if pluginVersionInfo:
188 versionInfo += "{0}\n{1}".format(separator, pluginVersionInfo) 188 versionInfo += "\n{0}\n{1}".format(separator, pluginVersionInfo)
189 distroInfo = Utilities.generateDistroInfo() 189 distroInfo = Utilities.generateDistroInfo()
190 if distroInfo: 190 if distroInfo:
191 versionInfo += "{0}\n{1}".format(separator, distroInfo) 191 versionInfo += "\n{0}\n{1}".format(separator, distroInfo)
192 192
193 if isinstance(excType, str): 193 if isinstance(excType, str):
194 tbinfo = tracebackobj 194 tbinfo = tracebackobj
195 else: 195 else:
196 tbinfofile = io.StringIO() 196 tbinfofile = io.StringIO()
197 traceback.print_tb(tracebackobj, None, tbinfofile) 197 traceback.print_tb(tracebackobj, None, tbinfofile)
198 tbinfofile.seek(0) 198 tbinfofile.seek(0)
199 tbinfo = tbinfofile.read() 199 tbinfo = tbinfofile.read()
200 errmsg = '{0}: \n{1}'.format(str(excType), str(excValue)) 200 errmsg = '{0}: \n{1}'.format(str(excType), str(excValue))
201 sections = [separator, timeString, separator, errmsg, separator, tbinfo] 201 sections = ['', separator, timeString, separator, errmsg, separator,
202 tbinfo]
202 msg = '\n'.join(sections) 203 msg = '\n'.join(sections)
203 try: 204 try:
204 f = open(logFile, "w", encoding="utf-8") 205 f = open(logFile, "w", encoding="utf-8")
205 f.write(msg) 206 f.write(msg)
206 f.write(versionInfo) 207 f.write(versionInfo)

eric ide

mercurial