Index: /trunk/src/VBox/ValidationKit/testdriver/base.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/base.py	(revision 65966)
+++ /trunk/src/VBox/ValidationKit/testdriver/base.py	(revision 65967)
@@ -306,5 +306,5 @@
                 return False;
             sCurName = sCurName.strip();
-            if sCurName is '':
+            if sCurName == '':
                 return False;
 
@@ -1094,5 +1094,5 @@
                 return self.pollTasks();
 
-            if len(self.aoTasks) == 0:
+            if not self.aoTasks:
                 return None;
 
@@ -1544,5 +1544,5 @@
                         del dPids[iPid];
 
-                if len(dPids) == 0:
+                if not dPids:
                     reporter.log('All done.');
                     return True;
Index: /trunk/src/VBox/ValidationKit/testdriver/btresolver.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/btresolver.py	(revision 65966)
+++ /trunk/src/VBox/ValidationKit/testdriver/btresolver.py	(revision 65967)
@@ -99,5 +99,5 @@
                 asMembers = utils.unpackFile(sDbgArchive, self.sScratchPath, self.fnLog,
                                              self.fnLog);
-                if asMembers is not None and len(asMembers) > 0:
+                if asMembers:
                     # Populate the list of debug files.
                     for sMember in asMembers:
@@ -155,5 +155,5 @@
         for sLine in asReport[iLine:]:
             asCandidate = sLine.split();
-            if     len(asCandidate) is 5 \
+            if     len(asCandidate) == 5 \
                and asCandidate[0].startswith('0x') \
                and asCandidate[1].startswith('0x') \
@@ -300,10 +300,10 @@
             while iLine < len(asReport):
                 asMatches = oRegExpPath.findall(asReport[iLine]);
-                if len(asMatches) > 0:
+                if asMatches:
                     # Line contains the path, extract start address and path to binary
                     sAddr = oRegExpAddr.findall(asReport[iLine]);
                     sPath = oRegExpBinPath.findall(asReport[iLine]);
 
-                    if len(sAddr) > 0 and len(sPath) > 0:
+                    if sAddr and sPath:
                         # Construct the path in into the build cache containing the debug symbols
                         oRegExp = re.compile(r'\w+\.{0,1}\w*$');
@@ -338,5 +338,5 @@
             # and the first one is a number.
             if     len(asStackTrace) == 6 and asStackTrace[0].isdigit() \
-               and (asStackTrace[1].find('VBox') is not -1 or asStackTrace[1].find('VirtualBox') is not -1) \
+               and (asStackTrace[1].find('VBox') != -1 or asStackTrace[1].find('VirtualBox') != -1) \
                and asStackTrace[3].startswith('0x'):
 
@@ -404,5 +404,5 @@
                 asMembers = utils.unpackFile(sDbgArchive, self.sScratchPath, self.fnLog,
                                              self.fnLog);
-                if asMembers is not None and len(asMembers) > 0:
+                if asMembers:
                     # Populate the list of debug files.
                     for sMember in asMembers:
@@ -589,5 +589,5 @@
             asListBinaries = self.oResolverOs.getBinaryListWithLoadAddrFromReport(sReport.split('\n'));
 
-            if len(asListBinaries) > 0:
+            if asListBinaries:
                 asArgs = [self.sRTLdrFltPath, ];
 
Index: /trunk/src/VBox/ValidationKit/testdriver/reporter.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/reporter.py	(revision 65966)
+++ /trunk/src/VBox/ValidationKit/testdriver/reporter.py	(revision 65967)
@@ -325,5 +325,5 @@
 
         # Flush buffers when reaching the last test.
-        if len(self.atTests) == 0:
+        if not self.atTests:
             self.xmlFlush(fRetry = True);
 
@@ -344,5 +344,5 @@
         Returns True if no open tests, False if there were open tests.
         """
-        if len(self.atTests) == 0:
+        if not self.atTests:
             return True;
         for _ in range(len(self.atTests)):
@@ -450,5 +450,5 @@
         if self.oXmlFile is not None:
             # pop the test stack
-            while len(self.atTests) > 0:
+            while self.atTests:
                 sName, cErrorsStart, self.fTimedOut = self.atTests.pop();
                 self._xmlWrite([ '<End timestamp="%s" errors="%d"/>' % (sTsIso, self.cErrors - cErrorsStart,),
@@ -538,5 +538,5 @@
                         self.log(0, 'error writing %s: %s' % (sDstFilename, oXcpt), sCaller, sTsPrf);
                     else:
-                        if len(abBuf) > 0:
+                        if abBuf:
                             continue;
                 break;
@@ -693,5 +693,5 @@
     def __del__(self):
         """Flush pending log messages?"""
-        if len(self._asXml) > 0:
+        if self._asXml:
             self._xmlDoFlush(self._asXml, fRetry = True, fDtor = True);
 
@@ -955,5 +955,5 @@
             asXml = self._asXml;
             self._asXml = [];
-            if len(asXml) > 0  or  fForce is True:
+            if asXml or fForce is True:
                 self._fXmlFlushing = True;
 
@@ -1030,5 +1030,5 @@
 
     def doPollWork(self, sDebug = None):
-        if len(self._asXml) > 0:
+        if self._asXml:
             g_oLock.acquire();
             try:
@@ -1083,5 +1083,5 @@
                     g_oReporter.log(0, '** internal-error: Hit exception #2! %s' % (traceback.format_exc()), sCaller, sTsPrf);
 
-                if len(asInfo) > 0:
+                if asInfo:
                     # Do the logging.
                     for sItem in asInfo:
@@ -1193,5 +1193,5 @@
             sText.strip();
             idxText = 0;
-            while len(sText) > 0:
+            while sText:
                 if self.sTagBuffer is None:
                     # Look for the start of a tag.
Index: /trunk/src/VBox/ValidationKit/testdriver/txsclient.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/txsclient.py	(revision 65966)
+++ /trunk/src/VBox/ValidationKit/testdriver/txsclient.py	(revision 65967)
@@ -257,5 +257,5 @@
                                        ord(sOpcode[6]), \
                                        ord(sOpcode[7]) ) ) );
-            if len(abPayload) > 0:
+            if abPayload:
                 abMsg.extend(abPayload);
         except:
@@ -282,5 +282,5 @@
 
         # Read the header.
-        if len(self.abReadAheadHdr) > 0:
+        if self.abReadAheadHdr:
             assert(len(self.abReadAheadHdr) == 16);
             abHdr = self.abReadAheadHdr;
@@ -756,5 +756,5 @@
                         rc = None;
                         break;
-                    if len(sInput) > 0:
+                    if sInput:
                         oStdIn.uTxsClientCrc32 = zlib.crc32(sInput, oStdIn.uTxsClientCrc32);
                         # Convert to a byte array before handing it of to sendMsg or the string
@@ -1090,5 +1090,5 @@
                 # Update the file stream CRC and send it off.
                 uMyCrc32 = zlib.crc32(abBuf, uMyCrc32);
-                if len(abBuf) == 0:
+                if not abBuf:
                     rc = self.sendMsg('DATA EOF', (long(uMyCrc32 & 0xffffffff), ));
                 else:
@@ -1108,5 +1108,5 @@
 
                 # EOF?
-                if len(abBuf) == 0:
+                if not abBuf:
                     break;
 
@@ -1149,5 +1149,5 @@
         rc = self.taskDownloadCommon(sRemoteFile, oLocalString);
         if rc is True:
-            if len(oLocalString.asContent) == 0:
+            if not oLocalString.asContent:
                 rc = '';
             else:
@@ -1930,5 +1930,5 @@
                 self.oSocket.setblocking(0);    # just in case it's not set.
                 sData = "1";
-                while len(sData) > 0:
+                while sData:
                     sData = self.oSocket.recv(16384);
             except:
@@ -1946,5 +1946,5 @@
         self.oCv.release();
 
-    def sendBytes(self, abMsg, cMsTimeout):
+    def sendBytes(self, abBuf, cMsTimeout):
         if self.oSocket is None:
             reporter.error('TransportTcp.sendBytes: No connection.');
@@ -1953,10 +1953,10 @@
         # Try send it all.
         try:
-            cbSent = self.oSocket.send(abMsg);
-            if cbSent == len(abMsg):
+            cbSent = self.oSocket.send(abBuf);
+            if cbSent == len(abBuf):
                 return True;
         except Exception, oXcpt:
             if not self.__isWouldBlockXcpt(oXcpt):
-                reporter.errorXcpt('TranportTcp.sendBytes: %s bytes' % (len(abMsg)));
+                reporter.errorXcpt('TranportTcp.sendBytes: %s bytes' % (len(abBuf)));
                 return False;
             cbSent = 0;
@@ -1967,5 +1967,5 @@
             cMsElapsed = base.timestampMilli() - msStart;
             if cMsElapsed > cMsTimeout:
-                reporter.error('TranportTcp.sendBytes: %s bytes timed out (1)' % (len(abMsg)));
+                reporter.error('TranportTcp.sendBytes: %s bytes timed out (1)' % (len(abBuf)));
                 break;
 
@@ -1973,9 +1973,9 @@
             try:
                 ttRc = select.select([], [self.oSocket], [self.oSocket], (cMsTimeout - cMsElapsed) / 1000.0);
-                if len(ttRc[2]) > 0 and len(ttRc[1]) == 0:
+                if ttRc[2] and not ttRc[1]:
                     reporter.error('TranportTcp.sendBytes: select returned with exception');
                     break;
-                if len(ttRc[1]) == 0:
-                    reporter.error('TranportTcp.sendBytes: %s bytes timed out (2)' % (len(abMsg)));
+                if not ttRc[1]:
+                    reporter.error('TranportTcp.sendBytes: %s bytes timed out (2)' % (len(abBuf)));
                     break;
             except:
@@ -1985,10 +1985,10 @@
             # Try send more.
             try:
-                cbSent += self.oSocket.send(abMsg[cbSent:]);
-                if cbSent == len(abMsg):
+                cbSent += self.oSocket.send(abBuf[cbSent:]);
+                if cbSent == len(abBuf):
                     return True;
             except Exception, oXcpt:
                 if not self.__isWouldBlockXcpt(oXcpt):
-                    reporter.errorXcpt('TranportTcp.sendBytes: %s bytes' % (len(abMsg)));
+                    reporter.errorXcpt('TranportTcp.sendBytes: %s bytes' % (len(abBuf)));
                     break;
 
@@ -2011,5 +2011,5 @@
             try:
                 abBuf = self.oSocket.recv(cb - len(self.abReadAhead));
-                if len(abBuf) > 0:
+                if abBuf:
                     self.abReadAhead.extend(array.array('B', abBuf));
             except Exception, oXcpt:
@@ -2026,5 +2026,5 @@
             cMsElapsed = base.timestampMilli() - msStart;
             if cMsElapsed > cMsTimeout:
-                if not fNoDataOk or len(self.abReadAhead) > 0:
+                if not fNoDataOk or self.abReadAhead:
                     reporter.error('TranportTcp.recvBytes: %s/%s bytes timed out (1)' % (len(self.abReadAhead), cb));
                 break;
@@ -2033,9 +2033,9 @@
             try:
                 ttRc = select.select([self.oSocket], [], [self.oSocket], (cMsTimeout - cMsElapsed) / 1000.0);
-                if len(ttRc[2]) > 0 and len(ttRc[0]) == 0:
+                if ttRc[2] and not ttRc[0]:
                     reporter.error('TranportTcp.recvBytes: select returned with exception');
                     break;
-                if len(ttRc[0]) == 0:
-                    if not fNoDataOk or len(self.abReadAhead) > 0:
+                if not ttRc[0]:
+                    if not fNoDataOk or self.abReadAhead:
                         reporter.error('TranportTcp.recvBytes: %s/%s bytes timed out (2) fNoDataOk=%s'
                                        % (len(self.abReadAhead), cb, fNoDataOk));
@@ -2048,5 +2048,5 @@
             try:
                 abBuf = self.oSocket.recv(cb - len(self.abReadAhead));
-                if len(abBuf) == 0:
+                if not abBuf:
                     reporter.error('TranportTcp.recvBytes: %s/%s bytes (%s) - connection has been shut down'
                                    % (len(self.abReadAhead), cb, fNoDataOk));
@@ -2059,5 +2059,5 @@
                 reporter.log('recv => exception %s' % (oXcpt,));
                 if not self.__isWouldBlockXcpt(oXcpt):
-                    if not fNoDataOk  or  not self.__isConnectionReset(oXcpt)  or  len(self.abReadAhead) > 0:
+                    if not fNoDataOk  or  not self.__isConnectionReset(oXcpt)  or  self.abReadAhead:
                         reporter.errorXcpt('TranportTcp.recvBytes: %s/%s bytes (%s)' % (len(self.abReadAhead), cb, fNoDataOk));
                     break;
@@ -2075,5 +2075,5 @@
         try:
             ttRc = select.select([], [], [self.oSocket], 0.0);
-            if len(ttRc[2]) > 0:
+            if ttRc[2]:
                 return False;
 
@@ -2086,5 +2086,5 @@
         try:
             ttRc = select.select([self.oSocket], [], [], cMsTimeout / 1000.0);
-            if len(ttRc[0]) == 0:
+            if not ttRc[0]:
                 return False;
         except:
Index: /trunk/src/VBox/ValidationKit/testdriver/vbox.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/vbox.py	(revision 65966)
+++ /trunk/src/VBox/ValidationKit/testdriver/vbox.py	(revision 65967)
@@ -2416,5 +2416,5 @@
         ## @todo Do this elsewhere.
         # Hack alert. Disables all annoying GUI popups.
-        if sType == 'gui' and len(self.aoRemoteSessions) == 0:
+        if sType == 'gui' and not self.aoRemoteSessions:
             try:
                 self.oVBox.setExtraData('GUI/Input/AutoCapture', 'false');
@@ -2456,5 +2456,5 @@
         if sType == 'gui':
             sEnv += '\nVBOX_GUI_DBG_ENABLED=1'
-        if asEnv is not None and len(asEnv) > 0:
+        if asEnv is not None and asEnv:
             sEnv += '\n' + ('\n'.join(asEnv));
 
@@ -2647,5 +2647,5 @@
                     for iCpu in xrange(0, cCpus):
                         sThis = oSession.queryDbgGuestStack(iCpu);
-                        if sThis is not None and len(sThis) > 0:
+                        if sThis:
                             asMiscInfos += [
                                 '================ start guest stack VCPU %s ================\n' % (iCpu,),
@@ -2671,5 +2671,5 @@
                         continue;
                     sThis = oSession.queryDbgInfo(sInfo, sArg);
-                    if sThis is not None and len(sThis) > 0:
+                    if sThis:
                         if sThis[-1] != '\n':
                             sThis += '\n';
@@ -2767,5 +2767,5 @@
 
         # Add the "info xxxx" items if we've got any.
-        if len(asMiscInfos) > 0:
+        if asMiscInfos:
             reporter.addLogString(u''.join(asMiscInfos), 'info.txt', 'info/collection', 'A bunch of info items.');
 
Index: /trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py	(revision 65966)
+++ /trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py	(revision 65967)
@@ -102,5 +102,5 @@
             # End of our parameters and start of the sub driver invocation.
             iArg = self.requireMoreArgs(1, asArgs, iArg);
-            assert len(self._asSubDriver) == 0;
+            assert not self._asSubDriver;
             self._asSubDriver = asArgs[iArg:];
             self._asSubDriver[0] = self._asSubDriver[0].replace('/', os.path.sep);
@@ -122,8 +122,8 @@
         # Check that we've got what we need.
         #
-        if len(self._asBuildUrls) == 0:
+        if not self._asBuildUrls:
             reporter.error('No build files specfiied ("--vbox-build file1[,file2[...]]")');
             return False;
-        if len(self._asSubDriver) == 0:
+        if not self._asSubDriver:
             reporter.error('No sub testdriver specified. (" -- test/stuff/tdStuff1.py args")');
             return False;
@@ -228,5 +228,5 @@
         try:
             oFile = open(sFull, 'w');
-            if len(sValue) > 0:
+            if sValue:
                 oFile.write(sValue.encode('utf-8'));
             oFile.close();
@@ -314,5 +314,5 @@
                 if iIteration in [0, 21]  and  sBase in [ 'windbg', 'gdb', 'gdb-i386-apple-darwin', ]:
                     reporter.log('Warning: debugger running: %s (%s)' % (oProcess.iPid, sBase,));
-            if len(aoTodo) == 0:
+            if not aoTodo:
                 return True;
 
Index: /trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py	(revision 65966)
+++ /trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py	(revision 65967)
@@ -626,5 +626,5 @@
                     raise base.InvalidOption('The "--paravirt-modes" value "%s" is not valid; valid values are: %s'
                                              % (sPvMode, ', '.join(g_kasParavirtProviders),));
-            if len(self.asParavirtModes) == 0:
+            if not self.asParavirtModes:
                 self.asParavirtModes = None;
 
