Changeset 65967 in vbox for trunk/src/VBox/ValidationKit/testdriver/reporter.py
- Timestamp:
- Mar 7, 2017 10:54:16 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/reporter.py
r65857 r65967 325 325 326 326 # Flush buffers when reaching the last test. 327 if len(self.atTests) == 0:327 if not self.atTests: 328 328 self.xmlFlush(fRetry = True); 329 329 … … 344 344 Returns True if no open tests, False if there were open tests. 345 345 """ 346 if len(self.atTests) == 0:346 if not self.atTests: 347 347 return True; 348 348 for _ in range(len(self.atTests)): … … 450 450 if self.oXmlFile is not None: 451 451 # pop the test stack 452 while len(self.atTests) > 0:452 while self.atTests: 453 453 sName, cErrorsStart, self.fTimedOut = self.atTests.pop(); 454 454 self._xmlWrite([ '<End timestamp="%s" errors="%d"/>' % (sTsIso, self.cErrors - cErrorsStart,), … … 538 538 self.log(0, 'error writing %s: %s' % (sDstFilename, oXcpt), sCaller, sTsPrf); 539 539 else: 540 if len(abBuf) > 0:540 if abBuf: 541 541 continue; 542 542 break; … … 693 693 def __del__(self): 694 694 """Flush pending log messages?""" 695 if len(self._asXml) > 0:695 if self._asXml: 696 696 self._xmlDoFlush(self._asXml, fRetry = True, fDtor = True); 697 697 … … 955 955 asXml = self._asXml; 956 956 self._asXml = []; 957 if len(asXml) > 0 orfForce is True:957 if asXml or fForce is True: 958 958 self._fXmlFlushing = True; 959 959 … … 1030 1030 1031 1031 def doPollWork(self, sDebug = None): 1032 if len(self._asXml) > 0:1032 if self._asXml: 1033 1033 g_oLock.acquire(); 1034 1034 try: … … 1083 1083 g_oReporter.log(0, '** internal-error: Hit exception #2! %s' % (traceback.format_exc()), sCaller, sTsPrf); 1084 1084 1085 if len(asInfo) > 0:1085 if asInfo: 1086 1086 # Do the logging. 1087 1087 for sItem in asInfo: … … 1193 1193 sText.strip(); 1194 1194 idxText = 0; 1195 while len(sText) > 0:1195 while sText: 1196 1196 if self.sTagBuffer is None: 1197 1197 # Look for the start of a tag.
Note:
See TracChangeset
for help on using the changeset viewer.