Changeset 65980 in vbox for trunk/src/VBox/ValidationKit/testmanager/core/build.py
- Timestamp:
- Mar 7, 2017 1:00:36 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113806
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testmanager/core/build.py
r65258 r65980 278 278 , (idBuildCategory,)) 279 279 aaoRows = self._oDb.fetchAll() 280 if len(aaoRows) == 0:280 if not aaoRows: 281 281 return None; 282 282 if len(aaoRows) != 1: … … 307 307 )); 308 308 aaoRows = self._oDb.fetchAll(); 309 if len(aaoRows) == 0:309 if not aaoRows: 310 310 return None; 311 311 if len(aaoRows) > 1: … … 323 323 # Check BuildCategoryData before do anything 324 324 dDataErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add); 325 if len(dDataErrors) > 0:325 if dDataErrors: 326 326 raise TMInvalidData('Invalid data passed to addBuildCategory(): %s' % (dDataErrors,)); 327 327 … … 432 432 for sBinary in self.sBinaries.split(','): 433 433 sBinary = sBinary.strip(); 434 if len(sBinary) == 0:434 if not sBinary: 435 435 continue; 436 436 # Same URL tests as in webutils.downloadFile(). … … 593 593 # 594 594 dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit); 595 if len(dErrors) > 0:595 if dErrors: 596 596 raise TMInvalidData('editEntry invalid input: %s' % (dErrors,)); 597 597 oOldData = BuildData().initFromDbWithId(self._oDb, oData.idBuild); … … 741 741 for i in range(len(oBuildEx.oCat.asOsArches)): 742 742 asParts = oBuildEx.oCat.asOsArches[i].split('.'); 743 if len(asParts) != 2 or len(asParts[0]) == 0 or len(asParts[1]) == 0:743 if len(asParts) != 2 or not asParts[0] or not asParts[1]: 744 744 raise self._oDb.integrityException('Bad build asOsArches value: %s (idBuild=%s idBuildCategory=%s)' 745 745 % (oBuildEx.asOsArches[i], oBuildEx.idBuild, oBuildEx.idBuildCategory));
Note:
See TracChangeset
for help on using the changeset viewer.