VirtualBox

Changeset 71963 in vbox for trunk


Ignore:
Timestamp:
Apr 22, 2018 1:12:48 PM (7 years ago)
Author:
vboxsync
Message:

ValidationKit: Make pylint happy

Location:
trunk/src/VBox/ValidationKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/utils.py

    r71233 r71963  
    328328                    if offComma < 0:
    329329                        return open(sFile, sMode + 'N');
    330                     return open(sFile, sMode[:offComma] + 'N' + sMode[offComma:]);
     330                    return open(sFile, sMode[:offComma] + 'N' + sMode[offComma:]); # pylint: disable=bad-open-mode
    331331
    332332            # Just in case.
  • trunk/src/VBox/ValidationKit/tests/api/tdMoveMedium1.py

    r71115 r71963  
    119119                    continue
    120120                (asExts, aTypes) = oDskFmt.describeFileExtensions()
    121                 for i in range(0, len(asExts)):
     121                for i in range(0, len(asExts)): #pylint: disable=consider-using-enumerate
    122122                    if aTypes[i] is vboxcon.DeviceType_HardDisk:
    123123                        sExt = '.' + asExts[i]
  • trunk/src/VBox/ValidationKit/tests/api/tdMoveVM1.py

    r71729 r71963  
    9797                continue
    9898            (asExts, aTypes) = oDskFmt.describeFileExtensions()
    99             for i in range(0, len(asExts)):
     99            for i in range(0, len(asExts)): #pylint: disable=consider-using-enumerate
    100100                if aTypes[i] is vboxcon.DeviceType_HardDisk:
    101101                    sExt = '.' + asExts[i]
     
    180180            if key == 'StandardImage' or key == 'ISOImage' or key == 'FloppyImage':
    181181                aReferences = dsReferenceFiles[key]
    182                 if len (aReferences) > 0:
     182                if aReferences:
    183183                    aoMediumAttachments = oMachine.getMediumAttachmentsOfController(value)
    184184                    for oAttachment in aoMediumAttachments:
     
    187187            elif key == 'SnapshotFile':
    188188                aReferences = dsReferenceFiles[key]
    189                 if len (aReferences) > 0:
     189                if aReferences:
    190190                    aActuals = self.__getSnapshotsFiles(oMachine)
    191191
     
    193193            elif key == 'SettingsFile':
    194194                aReferences = dsReferenceFiles[key]
    195                 if len (aReferences) > 0:
     195                if aReferences:
    196196                    aActuals.add(oMachine.settingsFilePath)
    197197
     
    199199            elif key == 'SavedStateFile':
    200200                aReferences = dsReferenceFiles[key]
    201                 if len (aReferences) > 0:
     201                if aReferences:
    202202                    aActuals = self.__getStatesFiles(oMachine)
    203203
     
    205205            elif key == 'LogFile':
    206206                aReferences = dsReferenceFiles[key]
    207                 if len (aReferences) > 0:
     207                if aReferences:
    208208                    aActuals = self.__getLogFiles(oMachine)
    209209
    210             if len(aActuals) > 0:
     210            if aActuals:
    211211                reporter.log('Check %s' % (key))
    212212                intersection = aReferences.intersection(aActuals)
Note: See TracChangeset for help on using the changeset viewer.

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