Index: /trunk/src/VBox/ValidationKit/testmanager/core/base.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/base.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/base.py	(revision 65980)
@@ -233,5 +233,5 @@
         # Perform deep conversion on ModelDataBase object and lists of them.
         #
-        elif isinstance(oValue, list) and len(oValue) > 0 and isinstance(oValue[0], ModelDataBase):
+        elif isinstance(oValue, list) and oValue and isinstance(oValue[0], ModelDataBase):
             oValue = copy.copy(oValue);
             for i, _ in enumerate(oValue):
@@ -269,5 +269,5 @@
         # Perform deep conversion on ModelDataBase object and lists of them.
         #
-        elif isinstance(oValue, list) and len(oValue) > 0 and isinstance(oValue[0], ModelDataBase):
+        elif isinstance(oValue, list) and oValue and isinstance(oValue[0], ModelDataBase):
             oValue = copy.copy(oValue);
             for i, _ in enumerate(oValue):
@@ -316,5 +316,5 @@
                                                     lMax = getattr(self, 'klMax_' + sAttr, None));
         elif sPrefix == 'f':
-            if oValue is '' and not fAllowNull: oValue = '0'; # HACK ALERT! Checkboxes are only added when checked.
+            if not oValue and not fAllowNull: oValue = '0'; # HACK ALERT! Checkboxes are only added when checked.
             (oNewValue, sError) = self.validateBool(oValue, aoNilValues = aoNilValues, fAllowNull = fAllowNull);
         elif sPrefix == 'ts':
@@ -743,5 +743,5 @@
     def validateListOfSomething(asValues, aoNilValues = tuple([[], None]), fAllowNull = True):
         """ Validate a list of some uniform values. Returns a copy of the list (if list it is). """
-        if asValues in aoNilValues  or  (len(asValues) == 0 and not fAllowNull):
+        if asValues in aoNilValues  or  (not asValues and not fAllowNull):
             return (asValues, None if fAllowNull else 'Mandatory.')
 
@@ -750,5 +750,5 @@
 
         asValues = list(asValues); # copy the list.
-        if len(asValues) > 0:
+        if asValues:
             oType = type(asValues[0]);
             for i in range(1, len(asValues)):
@@ -764,5 +764,5 @@
         (asValues, sError) = ModelDataBase.validateListOfSomething(asValues, aoNilValues, fAllowNull);
 
-        if sError is None  and asValues not in aoNilValues  and  len(asValues) > 0:
+        if sError is None  and  asValues not in aoNilValues  and  asValues:
             if not utils.isString(asValues[0]):
                 return (asValues, 'Invalid item data type.');
@@ -793,5 +793,5 @@
         (asValues, sError) = ModelDataBase.validateListOfSomething(asValues, aoNilValues, fAllowNull);
 
-        if sError is None  and asValues not in aoNilValues  and  len(asValues) > 0:
+        if sError is None  and  asValues not in aoNilValues  and  asValues:
             for i, _ in enumerate(asValues):
                 sValue = asValues[i];
@@ -1089,5 +1089,5 @@
 
     def testNullConversion(self):
-        if len(self.aoSamples[0].getDataAttributes()) == 0:
+        if not self.aoSamples[0].getDataAttributes():
             return;
         for oSample in self.aoSamples:
@@ -1261,5 +1261,5 @@
         else:
             assert False;
-        if len(oCriterion.aoSelected) > 0:
+        if oCriterion.aoSelected:
             oCriterion.sState = FilterCriterion.ksState_Selected;
         else:
Index: /trunk/src/VBox/ValidationKit/testmanager/core/build.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/build.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/build.py	(revision 65980)
@@ -278,5 +278,5 @@
                           , (idBuildCategory,))
         aaoRows = self._oDb.fetchAll()
-        if len(aaoRows) == 0:
+        if not aaoRows:
             return None;
         if len(aaoRows) != 1:
@@ -307,5 +307,5 @@
                           ));
         aaoRows = self._oDb.fetchAll();
-        if len(aaoRows) == 0:
+        if not aaoRows:
             return None;
         if len(aaoRows) > 1:
@@ -323,5 +323,5 @@
         # Check BuildCategoryData before do anything
         dDataErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
-        if len(dDataErrors) > 0:
+        if dDataErrors:
             raise TMInvalidData('Invalid data passed to addBuildCategory(): %s' % (dDataErrors,));
 
@@ -432,5 +432,5 @@
         for sBinary in self.sBinaries.split(','):
             sBinary = sBinary.strip();
-            if len(sBinary) == 0:
+            if not sBinary:
                 continue;
             # Same URL tests as in webutils.downloadFile().
@@ -593,5 +593,5 @@
         #
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
         oOldData = BuildData().initFromDbWithId(self._oDb, oData.idBuild);
@@ -741,5 +741,5 @@
         for i in range(len(oBuildEx.oCat.asOsArches)):
             asParts = oBuildEx.oCat.asOsArches[i].split('.');
-            if len(asParts) != 2 or len(asParts[0]) == 0 or len(asParts[1]) == 0:
+            if len(asParts) != 2 or not asParts[0] or not asParts[1]:
                 raise self._oDb.integrityException('Bad build asOsArches value: %s (idBuild=%s idBuildCategory=%s)'
                                                    % (oBuildEx.asOsArches[i], oBuildEx.idBuild, oBuildEx.idBuildCategory));
Index: /trunk/src/VBox/ValidationKit/testmanager/core/buildblacklist.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/buildblacklist.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/buildblacklist.py	(revision 65980)
@@ -193,5 +193,5 @@
         assert isinstance(oData, BuildBlacklistData);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
 
Index: /trunk/src/VBox/ValidationKit/testmanager/core/buildsource.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/buildsource.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/buildsource.py	(revision 65980)
@@ -213,5 +213,5 @@
         #
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('addEntry invalid input: %s' % (dErrors,));
         self._assertUnique(oData, None);
@@ -255,5 +255,5 @@
         #
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('addEntry invalid input: %s' % (dErrors,));
         self._assertUnique(oData, oData.idBuildSrc);
@@ -388,5 +388,5 @@
 
         # Types
-        if oBuildSource.asTypes is not None  and  len(oBuildSource.asTypes) > 0:
+        if oBuildSource.asTypes is not None  and  oBuildSource.asTypes:
             if len(oBuildSource.asTypes) == 1:
                 sExtraConditions += oCursor.formatBindArgs('   AND BuildCategories.sType = %s', (oBuildSource.asTypes[0],));
@@ -398,5 +398,5 @@
 
         # BuildSource OSes.ARCHes. (Paranoia: use a dictionary to avoid duplicate values.)
-        if oBuildSource.asOsArches is not None  and  len(oBuildSource.asOsArches) > 0:
+        if oBuildSource.asOsArches is not None  and  oBuildSource.asOsArches:
             sExtraConditions += oCursor.formatBindArgs('  AND BuildCategories.asOsArches && %s', (oBuildSource.asOsArches,));
 
Index: /trunk/src/VBox/ValidationKit/testmanager/core/db.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/db.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/db.py	(revision 65980)
@@ -34,6 +34,6 @@
 import os;
 import sys;
-import psycopg2;
-import psycopg2.extensions;
+import psycopg2;                            # pylint: disable=import-error
+import psycopg2.extensions;                 # pylint: disable=import-error
 
 # Validation Kit imports.
@@ -431,5 +431,5 @@
                 oRc = self.executeInternal(oCursor, sInsertSql + 'VALUES' + ', '.join(asValues), None, sCallerName);
                 asValues = [];
-        if len(asValues) > 0:
+        if asValues:
             oRc = self.executeInternal(oCursor, sInsertSql + 'VALUES' + ', '.join(asValues), None, sCallerName);
         return oRc
Index: /trunk/src/VBox/ValidationKit/testmanager/core/dbobjcache.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/dbobjcache.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/dbobjcache.py	(revision 65980)
@@ -156,5 +156,5 @@
                 if iRevision not in dRepo:
                     aiFiltered.append(iRevision);
-        if len(aiFiltered) > 0:
+        if aiFiltered:
             self._oDb.execute('SELECT *\n'
                               'FROM   VcsRevisions\n'
Index: /trunk/src/VBox/ValidationKit/testmanager/core/failurecategory.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/failurecategory.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/failurecategory.py	(revision 65980)
@@ -179,5 +179,5 @@
 
         # If we're at the end of the log, add the initial entry.
-        if len(aoRows) <= cMaxRows and len(aoRows) > 0:
+        if len(aoRows) <= cMaxRows and aoRows:
             oNew = aoRows[-1];
             aoEntries.append(ChangeLogEntry(oNew.uidAuthor, None, oNew.tsEffective, oNew.tsExpire, oNew, None, []));
@@ -233,5 +233,5 @@
         assert isinstance(oData, FailureCategoryData);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
 
@@ -254,5 +254,5 @@
         assert isinstance(oData, FailureCategoryData);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
 
@@ -285,5 +285,5 @@
                           , (idFailureCategory,));
         aaoRows = self._oDb.fetchAll();
-        if len(aaoRows) > 0:
+        if aaoRows:
             raise TMRowInUse('Cannot remove failure reason category %u because its being used by: %s'
                              % (idFailureCategory, ', '.join(aoRow[0] for aoRow in aaoRows),));
Index: /trunk/src/VBox/ValidationKit/testmanager/core/failurereason.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/failurereason.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/failurereason.py	(revision 65980)
@@ -316,5 +316,5 @@
 
         # If we're at the end of the log, add the initial entry.
-        if len(aoRows) <= cMaxRows and len(aoRows) > 0:
+        if len(aoRows) <= cMaxRows and aoRows:
             oNew = aoRows[-1];
             aoEntries.append(ChangeLogEntry(oNew.uidAuthor, None, oNew.tsEffective, oNew.tsExpire, oNew, None, []));
@@ -348,5 +348,5 @@
         #
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('addEntry invalid input: %s' % (dErrors,));
 
@@ -369,5 +369,5 @@
         assert isinstance(oData, FailureReasonData);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
 
@@ -405,5 +405,5 @@
                           , (idFailureReason, idFailureReason,));
         aaoRows = self._oDb.fetchAll();
-        if len(aaoRows) > 0:
+        if aaoRows:
             raise TMRowInUse('Cannot remove failure reason %u because its being used by: %s'
                              % (idFailureReason, ', '.join(aoRow[0] for aoRow in aaoRows),));
Index: /trunk/src/VBox/ValidationKit/testmanager/core/globalresource.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/globalresource.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/globalresource.py	(revision 65980)
@@ -272,5 +272,5 @@
         """
         # Quit quickly if there is nothing to alloocate.
-        if len(aoGlobalRsrcs) == 0:
+        if not aoGlobalRsrcs:
             return True;
 
Index: /trunk/src/VBox/ValidationKit/testmanager/core/report.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/report.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/report.py	(revision 65980)
@@ -143,5 +143,5 @@
             sWhere += self._oDb.formatBindArgs(' = %s\n', (self.aidSubjects[0],));
         else:
-            assert len(self.aidSubjects) > 0;
+            assert self.aidSubjects;
             sWhere += self._oDb.formatBindArgs(' IN (%s', (self.aidSubjects[0],));
             for i in range(1, len(self.aidSubjects)):
@@ -1130,15 +1130,15 @@
             if len(self.aidTestBoxes) == 1:
                 sQuery += '     AND TestSets.idTestBox = %u\n' % (self.aidTestBoxes[0],);
-            elif len(self.aidTestBoxes) > 0:
+            elif self.aidTestBoxes:
                 sQuery += '     AND TestSets.idTestBox IN (' + ','.join([str(i) for i in self.aidTestBoxes]) + ')\n';
 
             if len(self.aidBuildCats) == 1:
                 sQuery += '     AND TestSets.idBuildCategory = %u\n' % (self.aidBuildCats[0],);
-            elif len(self.aidBuildCats) > 0:
+            elif self.aidBuildCats:
                 sQuery += '     AND TestSets.idBuildCategory IN (' + ','.join([str(i) for i in self.aidBuildCats]) + ')\n';
 
             if len(self.aidTestCases) == 1:
                 sQuery += '     AND TestSets.idTestCase = %u\n' % (self.aidTestCases[0],);
-            elif len(self.aidTestCases) > 0:
+            elif self.aidTestCases:
                 sQuery += '     AND TestSets.idTestCase IN (' + ','.join([str(i) for i in self.aidTestCases]) + ')\n';
 
@@ -1244,5 +1244,5 @@
         # 2. Query all the testbox data in one go.
         aoRet = [];
-        if len(asIdGenTestBoxes) > 0:
+        if asIdGenTestBoxes:
             self._oDb.execute('SELECT   *\n'
                               'FROM     TestBoxesWithStrings\n'
@@ -1267,5 +1267,5 @@
 
         sSelectedBuildCats = '';
-        if len(self.aidBuildCats) > 0:
+        if self.aidBuildCats:
             sSelectedBuildCats = '   OR idBuildCategory IN (' + ','.join([str(i) for i in self.aidBuildCats]) + ')\n';
 
Index: /trunk/src/VBox/ValidationKit/testmanager/core/schedgroup.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/schedgroup.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/schedgroup.py	(revision 65980)
@@ -376,8 +376,8 @@
 
             dErrors = oNewMember.validateAndConvert(oDb, ModelDataBase.ksValidateFor_Other);
-            if len(dErrors) > 0:
+            if dErrors:
                 asErrors.append(str(dErrors));
 
-        if len(asErrors) == 0:
+        if not asErrors:
             for i, _ in enumerate(aoNewMembers):
                 idTestGroup = aoNewMembers[i];
@@ -387,5 +387,5 @@
                         break;
 
-        return (aoNewMembers, None if len(asErrors) == 0 else '<br>\n'.join(asErrors));
+        return (aoNewMembers, None if not asErrors else '<br>\n'.join(asErrors));
 
     def _validateAndConvertWorker(self, asAllowNullAttributes, oDb, enmValidateFor = ModelDataBase.ksValidateFor_Other):
@@ -471,5 +471,5 @@
         #
         dDataErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
-        if len(dDataErrors) > 0:
+        if dDataErrors:
             raise TMInvalidData('Invalid data passed to addEntry: %s' % (dDataErrors,));
         if self.exists(oData.sName):
@@ -515,5 +515,5 @@
         #
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry got invalid data: %s' % (dErrors,));
         self._assertUnique(oData.sName, oData.idSchedGroup);
@@ -572,5 +572,5 @@
         # associated testboxes or testgroups.
         #
-        if len(oData.aoTestBoxes) > 0:
+        if oData.aoTestBoxes:
             if fCascade is not True:
                 # Complain about there being associated testboxes.
@@ -587,5 +587,5 @@
 
                 oData = SchedGroupDataEx().initFromDbWithId(self._oDb, idSchedGroup);
-                if len(oData.aoTestBoxes) != 0:
+                if oData.aoTestBoxes:
                     raise TMRowInUse('More testboxes was added to the scheduling group as we were trying to delete it.');
 
Index: /trunk/src/VBox/ValidationKit/testmanager/core/schedulerbase.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/schedulerbase.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/schedulerbase.py	(revision 65980)
@@ -103,5 +103,5 @@
         # Associate extra members with the base data.
         #
-        if len(self.aoTestGroups) > 0:
+        if self.aoTestGroups:
             # Prep the test groups.
             for oTestGroup in self.aoTestGroups:
@@ -125,5 +125,5 @@
             # in both directions.
             oTestGroup = self.aoTestGroups[0];
-            oTestCase  = self.aoTestCases[0] if len(self.aoTestCases) > 0 else None;
+            oTestCase  = self.aoTestCases[0] if self.aoTestCases else None;
             for oArgVariation in self.aoArgsVariations:
                 if oTestGroup.idTestGroup != oArgVariation.idTestGroup:
@@ -137,6 +137,6 @@
 
         else:
-            assert len(self.aoTestCases)      == 0;
-            assert len(self.aoArgsVariations) == 0;
+            assert not self.aoTestCases;
+            assert not self.aoArgsVariations;
         # done.
 
@@ -198,11 +198,11 @@
         for oTestGroup in self.aoTestGroups:
             for oTestCase in oTestGroup.aoTestCases:
-                if len(oTestCase.aidPreReqs) == 0:
+                if not oTestCase.aidPreReqs:
                     continue;
 
                 # Stupid recursion code using special stack(s).
-                aiIndexes = [(oTestCase, 0), ];
+                aiIndexes = [[oTestCase, 0], ];
                 aidChain  = [oTestCase.idTestGroup,];
-                while len(aiIndexes) > 0:
+                while aiIndexes:
                     (oCur, i) = aiIndexes[-1];
                     if i >= len(oCur.aidPreReqs):
@@ -222,5 +222,5 @@
                                                  'TestCase #%s prerequisite #%s creates a cycle!'
                                                  % (oTestCase.idTestCase, idPreReq));
-                        elif len(oDep.aiPreReqs) == 0:
+                        elif not oDep.aiPreReqs:
                             pass;
                         elif len(aidChain) >= 10:
@@ -228,5 +228,5 @@
                                                  'TestCase #%s prerequisite chain is too long!'  % (oTestCase.idTestCase,));
                         else:
-                            aiIndexes.append((oDep, 0));
+                            aiIndexes.append([oDep, 0]);
                             aidChain.append(idPreReq);
 
@@ -238,5 +238,5 @@
         Note! Don't call this before checking for dependency cycles!
         """
-        if len(self.aoTestGroups) == 0:
+        if not self.aoTestGroups:
             return;
 
@@ -252,5 +252,5 @@
             iGrpPrio = oTestGroup.iSchedPriority;
 
-            if len(oTestGroup.aoTestCases) > 0:
+            if oTestGroup.aoTestCases:
                 iTstPrio = oTestGroup.aoTestCases[0];
                 for oTestCase in oTestGroup.aoTestCases:
@@ -283,5 +283,5 @@
             while i < len(oTestGroup.aoTestCases):
                 oTestCase = oTestGroup.aoTestCases[i];
-                if len(oTestCase.aidPreReqs) > 0:
+                if oTestCase.aidPreReqs:
                     for idPreReq in oTestCase.aidPreReqs:
                         iPreReq = oTestGroup.aoTestCases.index(oTestGroup.dTestCases[idPreReq]);
@@ -472,5 +472,5 @@
         def setupSource(self, oDb, idBuildSrc, sOs, sCpuArch, tsNow):
             """ Configures the build cursor for the cache. """
-            if len(self.aoEntries) == 0 and self.oCursor is None:
+            if not self.aoEntries and self.oCursor is None:
                 oBuildSource = BuildSourceData().initFromDbWithId(oDb, idBuildSrc, tsNow);
                 self.oCursor = BuildSourceLogic(oDb).openBuildCursor(oBuildSource, sOs, sCpuArch, tsNow);
@@ -594,5 +594,5 @@
         aoErrors = oData.checkForGroupDepCycles();
         aoErrors.extend(oData.checkForMissingTestCaseDeps());
-        if len(aoErrors) == 0:
+        if not aoErrors:
             oData.deepTestGroupSort();
 
@@ -609,10 +609,10 @@
             #
             aoItems = list();
-            if len(oData.aoArgsVariations) > 0:
+            if oData.aoArgsVariations:
                 aoItems = self._recreateQueueItems(oData);
                 self.msgDebug('len(aoItems)=%s' % (len(aoItems),));
                 #for i in range(len(aoItems)):
                 #    self.msgDebug('aoItems[%2d]=%s' % (i, aoItems[i]));
-            if len(aoItems) > 0:
+            if aoItems:
                 self._oDb.execute('SELECT offQueue FROM SchedQueues WHERE idSchedGroup = %s ORDER BY idItem LIMIT 1'
                                   , (self._oSchedGrpData.idSchedGroup,));
@@ -653,5 +653,5 @@
                                             oItem.idGenTestCaseArgs,
                                             oItem.idTestGroup,
-                                            oItem.aidTestGroupPreReqs if len(oItem.aidTestGroupPreReqs) > 0 else None,
+                                            oItem.aidTestGroupPreReqs if oItem.aidTestGroupPreReqs else None,
                                             oItem.bmHourlySchedule,
                                             oItem.cMissingGangMembers
@@ -696,5 +696,5 @@
 
             (aoErrors, asMessages) = oScheduler.recreateQueueWorker();
-            if len(aoErrors) == 0:
+            if not aoErrors:
                 SystemLogLogic(oDb).addEntry(SystemLogData.ksEvent_SchedQueueRecreate,
                                              'User #%d recreated sched queue #%d.' % (uidAuthor, idSchedGroup,));
@@ -1021,5 +1021,5 @@
         # Create a SQL values table out of them.
         sPreReqSet = ''
-        if len(dPreReqs) > 0:
+        if dPreReqs:
             for idPreReq in sorted(dPreReqs):
                 sPreReqSet += ', (' + str(idPreReq) + ')';
@@ -1046,5 +1046,5 @@
             # satisfied if there are any failure runs.
             #
-            if len(sPreReqSet) > 0:
+            if sPreReqSet:
                 fDecision = oEntry.getPreReqDecision(sPreReqSet);
                 if fDecision is None:
@@ -1303,5 +1303,5 @@
             iWorkItem = 0;
 
-        elif len(oTestBoxDataEx.aoInSchedGroups) > 0:
+        elif oTestBoxDataEx.aoInSchedGroups:
             # Construct priority table of currently enabled scheduling groups.
             aaoList1 = [];
Index: /trunk/src/VBox/ValidationKit/testmanager/core/schedulerbeci.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/schedulerbeci.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/schedulerbeci.py	(revision 65980)
@@ -88,5 +88,5 @@
                     for oTestCase in oTestGroup.aoTestCases:
                         #self.msgDebug('testcase loop: idTestCase=%s' % (oTestCase.idTestCase,));
-                        if iPrio <= oTestCase.iBeciPrio  and  len(oTestCase.aoArgsVariations) > 0:
+                        if iPrio <= oTestCase.iBeciPrio  and  oTestCase.aoArgsVariations:
                             # Get variation.
                             iNext = oTestCase.iNextVariation;
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testbox.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testbox.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testbox.py	(revision 65980)
@@ -644,5 +644,5 @@
             oInSchedGroup.idTestBox = self.idTestBox;
             dCurErrors = oInSchedGroup.validateAndConvert(oDb, ModelDataBase.ksValidateFor_Other);
-            if len(dCurErrors) == 0:
+            if not dCurErrors:
                 pass; ## @todo figure out the ID?
             else:
@@ -663,5 +663,5 @@
                     break;
 
-        return (aoNewValues, dErrors if len(dErrors) > 0 else None);
+        return (aoNewValues, dErrors if dErrors else None);
 
 
@@ -768,5 +768,5 @@
         from testmanager.core.testboxstatus import TestBoxStatusData;
 
-        if aiSortColumns is None or len(aiSortColumns) == 0:
+        if not aiSortColumns:
             aiSortColumns = [self.kiSortColumn_sName,];
 
@@ -846,5 +846,5 @@
 
         # If we're at the end of the log, add the initial entry.
-        if len(aoRows) <= cMaxRows and len(aoRows) > 0:
+        if len(aoRows) <= cMaxRows and aoRows:
             oNew = aoRows[-1];
             aoEntries.append(ChangeLogEntry(oNew.uidAuthor, None, oNew.tsEffective, oNew.tsExpire, oNew, None, []));
@@ -862,8 +862,8 @@
         """
         dDataErrors = oData.validateAndConvert(self._oDb, enmValidateFor);
-        if len(dDataErrors) > 0:
+        if dDataErrors:
             raise TMInvalidData('TestBoxLogic.addEntry: %s' % (dDataErrors,));
         if isinstance(oData, TestBoxDataEx):
-            if len(oData.aoInSchedGroups):
+            if oData.aoInSchedGroups:
                 sSchedGrps = ', '.join('(%s)' % oCur.idSchedGroup for oCur in oData.aoInSchedGroups);
                 self._oDb.execute('SELECT   SchedGroupIDs.idSchedGroup\n'
@@ -874,5 +874,5 @@
                                   'WHERE    SchedGroups.idSchedGroup IS NULL\n');
                 aaoRows = self._oDb.fetchAll();
-                if len(aaoRows) > 0:
+                if aaoRows:
                     raise TMInvalidData('TestBoxLogic.addEntry missing scheduling groups: %s'
                                         % (', '.join(str(aoRow[0]) for aoRow in aaoRows),));
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py	(revision 65980)
@@ -372,7 +372,7 @@
 
         # Null conversions for new parameters.
-        if len(sReport) == 0:
+        if not sReport:
             sReport = None;
-        if len(sCpuName) == 0:
+        if not sCpuName:
             sCpuName = None;
         if lCpuRevision <= 0:
@@ -657,5 +657,5 @@
         #
         sBody = self._getStringParam(constants.tbreq.LOG_PARAM_BODY, fStrip = False);
-        if len(sBody) == 0:
+        if not sBody:
             return self._resultResponse(constants.tbresp.STATUS_NACK);
         self._checkForUnknownParameters();
@@ -753,5 +753,5 @@
         sXml = self._getStringParam(constants.tbreq.XML_RESULT_PARAM_BODY, fStrip = False);
         self._checkForUnknownParameters();
-        if len(sXml) == 0: # Used for link check by vboxinstaller.py on Windows.
+        if not sXml: # Used for link check by vboxinstaller.py on Windows.
             return self._resultResponse(constants.tbresp.STATUS_ACK);
 
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testcase.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testcase.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testcase.py	(revision 65980)
@@ -298,5 +298,5 @@
         Test Case depends on
         """
-        if len(aTestCaseDependencyData) == 0:
+        if not aTestCaseDependencyData:
             return []
 
@@ -889,5 +889,5 @@
         else:
             assert sAttr == 'aoTestCaseArgs';
-            if self.aoTestCaseArgs is None or len(self.aoTestCaseArgs) == 0:
+            if not self.aoTestCaseArgs:
                 return (None, 'The testcase requires at least one argument variation to be valid.');
 
@@ -899,5 +899,5 @@
                 oVar.idTestCase = self.idTestCase;
                 dCurErrors = oVar.validateAndConvert(oDb, ModelDataBase.ksValidateFor_Other);
-                if len(dCurErrors) == 0:
+                if not dCurErrors:
                     pass; ## @todo figure out the ID?
                 else:
@@ -919,7 +919,7 @@
                         break;
 
-            return (aoNewValues, dErrors if len(dErrors) > 0 else None);
-
-        return (aoNewValues, None if len(asErrors) == 0 else ' <br>'.join(asErrors));
+            return (aoNewValues, dErrors if dErrors else None);
+
+        return (aoNewValues, None if not asErrors else ' <br>'.join(asErrors));
 
     def _validateAndConvertWorker(self, asAllowNullAttributes, oDb, enmValidateFor = ModelDataBase.ksValidateFor_Other):
@@ -928,5 +928,5 @@
         # Validate dependencies a wee bit for paranoid reasons. The scheduler
         # queue generation code does the real validation here!
-        if len(dErrors) == 0 and self.idTestCase is not None:
+        if not dErrors and self.idTestCase is not None:
             for oDep in self.aoDepTestCases:
                 if oDep.idTestCase == self.idTestCase:
@@ -1126,5 +1126,5 @@
 
         # If we're at the end of the log, add the initial entry.
-        if len(aoRows) <= cMaxRows and len(aoRows) > 0:
+        if len(aoRows) <= cMaxRows and aoRows:
             oNew = aoRows[-1];
             aoEntries.append(ChangeLogEntry(oNew.uidAuthor, None,
@@ -1145,5 +1145,5 @@
         assert isinstance(oData, TestCaseDataEx);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('Invalid input data: %s' % (dErrors,));
 
@@ -1190,5 +1190,5 @@
         assert isinstance(oData, TestCaseDataEx);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('Invalid input data: %s' % (dErrors,));
 
@@ -1228,5 +1228,5 @@
             if idDep in aidNewDeps:
                 asKeepers.append(str(idDep));
-        if len(asKeepers) > 0:
+        if asKeepers:
             sQuery += '     AND idTestCasePreReq NOT IN (' + ', '.join(asKeepers) + ')\n';
         self._oDb.execute(sQuery);
@@ -1253,5 +1253,5 @@
             if idDep in aidNewDeps:
                 asKeepers.append(str(idDep));
-        if len(asKeepers) > 0:
+        if asKeepers:
             sQuery = '     AND idGlobalRsrc NOT IN (' + ', '.join(asKeepers) + ')\n';
         self._oDb.execute(sQuery);
@@ -1276,5 +1276,5 @@
         for oNewVar in oData.aoTestCaseArgs:
             asKeepers.append(self._oDb.formatBindArgs('%s', (oNewVar.sArgs,)));
-        if len(asKeepers) > 0:
+        if asKeepers:
             sQuery += '    AND  sArgs NOT IN (' + ', '.join(asKeepers) + ')\n';
         self._oDb.execute(sQuery);
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testcaseargs.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testcaseargs.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testcaseargs.py	(revision 65980)
@@ -273,5 +273,5 @@
 
         # Create a set of global resource IDs.
-        if len(oDataEx.aoGlobalRsrc) == 0:
+        if not oDataEx.aoGlobalRsrc:
             return True;
         asIdRsrcs = [str(oDep.idGlobalRsrc) for oDep, _ in oDataEx.aoGlobalRsrc];
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testgroup.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testgroup.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testgroup.py	(revision 65980)
@@ -353,8 +353,8 @@
 
             dErrors = oNewMember.validateAndConvert(oDb, ModelDataBase.ksValidateFor_Other);
-            if len(dErrors) > 0:
+            if dErrors:
                 asErrors.append(str(dErrors));
 
-        if len(asErrors) == 0:
+        if not asErrors:
             for i, _ in enumerate(aoNewMembers):
                 idTestCase = aoNewMembers[i];
@@ -364,5 +364,5 @@
                         break;
 
-        return (aoNewMembers, None if len(asErrors) == 0 else '<br>\n'.join(asErrors));
+        return (aoNewMembers, None if not asErrors else '<br>\n'.join(asErrors));
 
 
@@ -419,5 +419,5 @@
         assert isinstance(oData, TestGroupDataEx);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('addEntry invalid input: %s' % (dErrors,));
         self._assertUniq(oData, None);
@@ -453,5 +453,5 @@
         assert isinstance(oData, TestGroupDataEx);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
         self._assertUniq(oData, oData.idTestGroup);
@@ -502,6 +502,6 @@
                                           '   AND tsExpire    = \'infinity\'::TIMESTAMP\n'
                                           , ( oData.idTestGroup, ));
-        if len(dNew) > 0:
-            sQuery += '   AND idTestCase NOT IN (%s)' % (', '.join([str(iKey) for iKey in dNew.keys()]),);
+        if dNew:
+            sQuery += '   AND idTestCase NOT IN (%s)' % (', '.join([str(iKey) for iKey in dNew]),);
         self._oDb.execute(sQuery);
 
@@ -527,5 +527,5 @@
                               , ( idTestGroup, ));
             aoGroups = self._oDb.fetchAll();
-            if len(aoGroups) > 0:
+            if aoGroups:
                 asGroups = ['%s (#%d)' % (sName, idSchedGroup) for idSchedGroup, sName in aoGroups];
                 raise TMRowInUse('Test group #%d is member of one or more scheduling groups: %s'
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testresultfailures.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testresultfailures.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testresultfailures.py	(revision 65980)
@@ -353,5 +353,5 @@
 
         # If we're at the end of the log, add the initial entry.
-        if len(aaoRows) <= cMaxRows and len(aaoRows) > 0:
+        if len(aaoRows) <= cMaxRows and aaoRows:
             aoNew    = aaoRows[-1];
             tsExpire = aaoRows[-1 - 1][0] if len(aaoRows) > 1 else aoNew[2].tsExpire;
@@ -387,5 +387,5 @@
         assert isinstance(oData, TestResultFailureData);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_AddForeignId);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
 
@@ -416,5 +416,5 @@
         assert isinstance(oData, TestResultFailureData);
         dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
-        if len(dErrors) > 0:
+        if dErrors:
             raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
 
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testresults.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testresults.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testresults.py	(revision 65980)
@@ -1684,5 +1684,5 @@
                 if aoRow[0] in dLeft:
                     del dLeft[aoRow[0]];
-            if len(dLeft) > 0:
+            if dLeft:
                 if fIdIsName:
                     for idMissing in dLeft:
@@ -1719,5 +1719,5 @@
                 oMain.cTimes += aoRow[4];
 
-            if len(dLeft) > 0:
+            if dLeft:
                 pass; ## @todo
 
@@ -2090,5 +2090,5 @@
 
         aaoRows = self._oDb.fetchAll();
-        if len(aaoRows) == 0:
+        if not aaoRows:
             raise TMRowNotFound('No test results for idTestSet=%d.' % (idTestSet,));
 
@@ -2557,5 +2557,5 @@
         # Validate string attributes.
         for sAttr in [ 'name', 'text' ]: # 'unit' can be zero length.
-            if sAttr in dAttribs and len(dAttribs[sAttr]) == 0:
+            if sAttr in dAttribs and not dAttribs[sAttr]:
                 return 'Element %s has an empty %s attribute value.' % (sName, sAttr,);
 
@@ -2622,5 +2622,5 @@
         dAttribs = {};
         sElement = sElement.strip();
-        while len(sElement) > 0:
+        while sElement:
             # Extract attribute name.
             off = sElement.find('=');
@@ -2678,5 +2678,5 @@
         """
         if sName == 'Test':
-            iNestingDepth = aoStack[0].iNestingDepth + 1 if len(aoStack) > 0 else 0;
+            iNestingDepth = aoStack[0].iNestingDepth + 1 if aoStack else 0;
             aoStack.insert(0, self._newTestResult(idTestResultParent = aoStack[0].idTestResult, idTestSet = idTestSet,
                                                   tsCreated = dAttribs['timestamp'], sName = dAttribs['name'],
@@ -2748,5 +2748,5 @@
         """
         aoStack    = self._getResultStack(idTestSet); # [0] == top; [-1] == bottom.
-        if len(aoStack) == 0:
+        if not aoStack:
             return ('No open results', True);
         self._oDb.dprint('** processXmlStream len(aoStack)=%s' % (len(aoStack),));
@@ -2760,5 +2760,5 @@
         fExpectCloseTest = False;
         sXml = sXml.strip();
-        while len(sXml) > 0:
+        while sXml:
             if sXml.startswith('</Test>'): # Only closing tag.
                 offNext = len('</Test>');
@@ -2821,7 +2821,7 @@
         if sError is None and fExpectCloseTest:
             sError = 'Expected </Test> before the end of the XML section.'
-        elif sError is None and len(aaiHints) > 0:
+        elif sError is None and aaiHints:
             sError = 'Expected </PopHint> before the end of the XML section.'
-        if len(aaiHints) > 0:
+        if aaiHints:
             self._doPopHint(aoStack, aaiHints[-1][0], dCounts, idTestSet);
 
@@ -2833,6 +2833,6 @@
                                                'idTestSet=%s idTestResult=%s XML="%s" %s'
                                                % ( idTestSet,
-                                                   aoStack[0].idTestResult if len(aoStack) > 0 else -1,
-                                                   sXml[:30 if len(sXml) >= 30 else len(sXml)],
+                                                   aoStack[0].idTestResult if aoStack else -1,
+                                                   sXml[:min(len(sXml), 30)],
                                                    sError, ),
                                                cHoursRepeat = 6, fCommit = True);
Index: /trunk/src/VBox/ValidationKit/testmanager/core/testset.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/testset.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/testset.py	(revision 65980)
@@ -377,5 +377,5 @@
                           , (idTestSet, TestSetData.ksTestStatus_Running, oData.idTestResult));
         aaoRows = self._oDb.fetchAll();
-        if len(aaoRows):
+        if aaoRows:
             idStr = self.strTabString('Unclosed test result', fCommit = fCommit);
             for aoRow in aaoRows:
Index: /trunk/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py	(revision 65980)
@@ -143,5 +143,5 @@
         if len(aaoRows) == 1:
             return VcsRevisionData().initFromDbRow(aaoRows[0]);
-        if len(aaoRows) != 0:
+        if aaoRows:
             raise TMExceptionBase('VcsRevisions has a primary key problem: %u duplicates' % (len(aaoRows),));
         return None
@@ -160,5 +160,5 @@
         # Check VcsRevisionData before do anything
         dDataErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
-        if len(dDataErrors) > 0:
+        if dDataErrors:
             raise TMExceptionBase('Invalid data passed to addVcsRevision(): %s' % (dDataErrors,));
 
Index: /trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py
===================================================================
--- /trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py	(revision 65979)
+++ /trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py	(revision 65980)
@@ -260,5 +260,5 @@
         if self._sBodyType is None:
             self._sBodyType = 'html';
-        elif self._sBodyType is not 'html':
+        elif self._sBodyType != 'html':
             raise WebServerGlueException('Cannot use writeParameter when body type is "%s"' % (self._sBodyType, ));
 
@@ -277,5 +277,5 @@
         if self._sBodyType is None:
             self._sBodyType = 'html';
-        elif self._sBodyType is not 'html':
+        elif self._sBodyType != 'html':
             raise WebServerGlueException('Cannot use writeParameter when body type is "%s"' % (self._sBodyType, ));
 
@@ -304,5 +304,5 @@
             self._sBodyType = 'form';
 
-        elif self._sBodyType is not 'form':
+        elif self._sBodyType != 'form':
             raise WebServerGlueException('Cannot use writeParams when body type is "%s"' % (self._sBodyType, ));
 
