VirtualBox

Ignore:
Timestamp:
Mar 7, 2017 10:54:16 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113793
Message:

ValidationKit/testdriver: pylint 2.0.0 fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/btresolver.py

    r65378 r65967  
    9999                asMembers = utils.unpackFile(sDbgArchive, self.sScratchPath, self.fnLog,
    100100                                             self.fnLog);
    101                 if asMembers is not None and len(asMembers) > 0:
     101                if asMembers:
    102102                    # Populate the list of debug files.
    103103                    for sMember in asMembers:
     
    155155        for sLine in asReport[iLine:]:
    156156            asCandidate = sLine.split();
    157             if     len(asCandidate) is 5 \
     157            if     len(asCandidate) == 5 \
    158158               and asCandidate[0].startswith('0x') \
    159159               and asCandidate[1].startswith('0x') \
     
    300300            while iLine < len(asReport):
    301301                asMatches = oRegExpPath.findall(asReport[iLine]);
    302                 if len(asMatches) > 0:
     302                if asMatches:
    303303                    # Line contains the path, extract start address and path to binary
    304304                    sAddr = oRegExpAddr.findall(asReport[iLine]);
    305305                    sPath = oRegExpBinPath.findall(asReport[iLine]);
    306306
    307                     if len(sAddr) > 0 and len(sPath) > 0:
     307                    if sAddr and sPath:
    308308                        # Construct the path in into the build cache containing the debug symbols
    309309                        oRegExp = re.compile(r'\w+\.{0,1}\w*$');
     
    338338            # and the first one is a number.
    339339            if     len(asStackTrace) == 6 and asStackTrace[0].isdigit() \
    340                and (asStackTrace[1].find('VBox') is not -1 or asStackTrace[1].find('VirtualBox') is not -1) \
     340               and (asStackTrace[1].find('VBox') != -1 or asStackTrace[1].find('VirtualBox') != -1) \
    341341               and asStackTrace[3].startswith('0x'):
    342342
     
    404404                asMembers = utils.unpackFile(sDbgArchive, self.sScratchPath, self.fnLog,
    405405                                             self.fnLog);
    406                 if asMembers is not None and len(asMembers) > 0:
     406                if asMembers:
    407407                    # Populate the list of debug files.
    408408                    for sMember in asMembers:
     
    589589            asListBinaries = self.oResolverOs.getBinaryListWithLoadAddrFromReport(sReport.split('\n'));
    590590
    591             if len(asListBinaries) > 0:
     591            if asListBinaries:
    592592                asArgs = [self.sRTLdrFltPath, ];
    593593
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