Changeset 94129 in vbox for trunk/src/VBox/ValidationKit/testmanager/core/restdispatcher.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/restdispatcher.py
r93115 r94129 220 220 if not os.path.exists(os.path.dirname(sFile)): 221 221 os.makedirs(os.path.dirname(sFile), 0o755); 222 oFile = open(sFile, 'ab'); 223 224 # Check the size. 225 fSizeOk = True; 226 if not fIgnoreSizeCheck: 227 oStat = os.fstat(oFile.fileno()); 228 fSizeOk = oStat.st_size / (1024 * 1024) < config.g_kcMbMaxMainLog; 229 230 # Write the text. 231 if fSizeOk: 232 if sys.version_info[0] >= 3: 233 oFile.write(bytes(sText, 'utf-8')); 234 else: 235 oFile.write(sText); 236 237 # Done 238 oFile.close(); 222 223 with open(sFile, 'ab') as oFile: 224 # Check the size. 225 fSizeOk = True; 226 if not fIgnoreSizeCheck: 227 oStat = os.fstat(oFile.fileno()); 228 fSizeOk = oStat.st_size / (1024 * 1024) < config.g_kcMbMaxMainLog; 229 230 # Write the text. 231 if fSizeOk: 232 if sys.version_info[0] >= 3: 233 oFile.write(bytes(sText, 'utf-8')); 234 else: 235 oFile.write(sText); 236 239 237 return fSizeOk; 240 238
Note:
See TracChangeset
for help on using the changeset viewer.