Changeset 94129 in vbox for trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.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/testboxcontroller.py
r93115 r94129 327 327 if not os.path.exists(os.path.dirname(sFile)): 328 328 os.makedirs(os.path.dirname(sFile), 0o755); 329 oFile = open(sFile, 'ab'); 330 331 # Check the size. 332 fSizeOk = True; 333 if not fIgnoreSizeCheck: 334 oStat = os.fstat(oFile.fileno()); 335 fSizeOk = oStat.st_size / (1024 * 1024) < config.g_kcMbMaxMainLog; 336 337 # Write the text. 338 if fSizeOk: 339 if sys.version_info[0] >= 3: 340 oFile.write(bytes(sText, 'utf-8')); 341 else: 342 oFile.write(sText); 343 344 # Done 345 oFile.close(); 329 330 with open(sFile, 'ab') as oFile: 331 # Check the size. 332 fSizeOk = True; 333 if not fIgnoreSizeCheck: 334 oStat = os.fstat(oFile.fileno()); 335 fSizeOk = oStat.st_size / (1024 * 1024) < config.g_kcMbMaxMainLog; 336 337 # Write the text. 338 if fSizeOk: 339 if sys.version_info[0] >= 3: 340 oFile.write(bytes(sText, 'utf-8')); 341 else: 342 oFile.write(sText); 343 346 344 return fSizeOk; 347 345
Note:
See TracChangeset
for help on using the changeset viewer.