VirtualBox

Ignore:
Timestamp:
Nov 24, 2022 11:46:15 AM (2 years ago)
Author:
vboxsync
Message:

Validation Kit: Fixed lots of warnings, based on pylint 2.12.2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/storage/tdStorageRawDrive1.py

    r96407 r97673  
    10861086                    sKey = oMatch.group(1).strip();
    10871087                    sValue = oMatch.group(2).strip();
    1088                     if sKey not in asHeader.keys():
     1088                    if sKey not in asHeader:
    10891089                        return reporter.error("VMDK descriptor has invalid format");
    10901090                    sDictValue = asHeader[sKey];
     
    11221122                sKey = oMatch.group(1).strip();
    11231123                sValue = oMatch.group(2).strip();
    1124                 if sKey not in asDatabase.keys():
     1124                if sKey not in asDatabase:
    11251125                    return reporter.error("VMDK descriptor has invalid format");
    11261126                sDictValue = asDatabase[sKey];
     
    11901190                            reporter.error('Download vmdktest.vmdk from guest to host failed');
    11911191                        else:
    1192                             with open(sDstFile) as oFile:
     1192                            with open(sDstFile) as oFile: # pylint: disable=unspecified-encoding
    11931193                                asDescriptor = [row.strip() for row in oFile];
    11941194                            if not asDescriptor:
     
    15791579        oSet.aoTestVms.extend([oTestVm for oTestVm in self.asTestVmClasses.values() if oTestVm is not None]);
    15801580        sOs = self.getBuildOs();
    1581         if sOs in self.asTestVmClasses.keys():
     1581        if sOs in self.asTestVmClasses:
    15821582            for oTestVM in oSet.aoTestVms:
    15831583                if oTestVM is not None:
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