Changeset 94129 in vbox for trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py
- Timestamp:
- Mar 8, 2022 2:57:25 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py
r93115 r94129 138 138 self._oDbgFile = sys.stderr; 139 139 if config.g_ksSrvGlueDebugLogDst is not None and config.g_kfSrvGlueDebug is True: 140 self._oDbgFile = open(config.g_ksSrvGlueDebugLogDst, 'a'); 140 self._oDbgFile = open(config.g_ksSrvGlueDebugLogDst, 'a'); # pylint: disable=consider-using-with 141 141 if config.g_kfSrvGlueCgiDumpArgs: 142 142 self._oDbgFile.write('Arguments: %s\nEnvironment:\n' % (sys.argv,)); … … 303 303 """ 304 304 if self._fHeaderWrittenOut is False: 305 for sKey in self._dHeaderFields:306 self._writeHeader('%s: %s\n' % (sKey, s elf._dHeaderFields[sKey]));305 for sKey, sValue in self._dHeaderFields.items(): 306 self._writeHeader('%s: %s\n' % (sKey, sValue,)); 307 307 self._fHeaderWrittenOut = True; 308 308 self._writeHeader('\n'); # End of header indicator. … … 462 462 463 463 try: 464 oFile = open(sLogFile, 'w'); 465 oFile.write(sError + '\n\n'); 466 if aXcptInfo[0] is not None: 467 oFile.write(' B a c k t r a c e\n'); 468 oFile.write('===================\n'); 469 oFile.write(cgitb.text(aXcptInfo, 5)); 470 oFile.write('\n\n'); 471 472 oFile.write(' D e b u g I n f o\n'); 473 oFile.write('=====================\n\n'); 474 self._fHtmlDebugOutput = False; 475 self.debugDumpStuff(oFile.write); 476 477 oFile.close(); 464 with open(sLogFile, 'w') as oFile: 465 oFile.write(sError + '\n\n'); 466 if aXcptInfo[0] is not None: 467 oFile.write(' B a c k t r a c e\n'); 468 oFile.write('===================\n'); 469 oFile.write(cgitb.text(aXcptInfo, 5)); 470 oFile.write('\n\n'); 471 472 oFile.write(' D e b u g I n f o\n'); 473 oFile.write('=====================\n\n'); 474 self._fHtmlDebugOutput = False; 475 self.debugDumpStuff(oFile.write); 478 476 except: 479 477 fRc = False;
Note:
See TracChangeset
for help on using the changeset viewer.