VirtualBox

Ignore:
Timestamp:
Mar 7, 2017 1:00:36 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113806
Message:

testmanager/core: pylint 2.0.0 fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/core/build.py

    r65258 r65980  
    278278                          , (idBuildCategory,))
    279279        aaoRows = self._oDb.fetchAll()
    280         if len(aaoRows) == 0:
     280        if not aaoRows:
    281281            return None;
    282282        if len(aaoRows) != 1:
     
    307307                          ));
    308308        aaoRows = self._oDb.fetchAll();
    309         if len(aaoRows) == 0:
     309        if not aaoRows:
    310310            return None;
    311311        if len(aaoRows) > 1:
     
    323323        # Check BuildCategoryData before do anything
    324324        dDataErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Add);
    325         if len(dDataErrors) > 0:
     325        if dDataErrors:
    326326            raise TMInvalidData('Invalid data passed to addBuildCategory(): %s' % (dDataErrors,));
    327327
     
    432432        for sBinary in self.sBinaries.split(','):
    433433            sBinary = sBinary.strip();
    434             if len(sBinary) == 0:
     434            if not sBinary:
    435435                continue;
    436436            # Same URL tests as in webutils.downloadFile().
     
    593593        #
    594594        dErrors = oData.validateAndConvert(self._oDb, oData.ksValidateFor_Edit);
    595         if len(dErrors) > 0:
     595        if dErrors:
    596596            raise TMInvalidData('editEntry invalid input: %s' % (dErrors,));
    597597        oOldData = BuildData().initFromDbWithId(self._oDb, oData.idBuild);
     
    741741        for i in range(len(oBuildEx.oCat.asOsArches)):
    742742            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]:
    744744                raise self._oDb.integrityException('Bad build asOsArches value: %s (idBuild=%s idBuildCategory=%s)'
    745745                                                   % (oBuildEx.asOsArches[i], oBuildEx.idBuild, oBuildEx.idBuildCategory));
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette