VirtualBox

Ignore:
Timestamp:
Jan 14, 2023 10:47:51 AM (23 months ago)
Author:
vboxsync
Message:

Validation Kit/tests/tdCloneMedium1: Various pylint fixes. bugref:10090

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/api/tdCloneMedium1.py

    r97936 r98079  
    4343# Standard Python imports.
    4444import os
    45 from subprocess import call
    4645import sys
    4746
     
    7877    #
    7978
    80     def createTestMedium(self, oVM, sPathSuffix, sFmt = 'VDI', cbSize = 1024*1024, data = []):
     79    def createTestMedium(self, oVM, sPathSuffix, sFmt = 'VDI', cbSize = 1024*1024, data):
    8180        assert oVM is not None
    8281
     
    101100        oMediumIOBaseHdd1 = oBaseHdd1.openForIO(True, "")
    102101
    103         if(len(data) > 0):
     102        if data and len(data):
    104103            cbWritten = oMediumIOBaseHdd1.write(0, data)
    105104
     
    134133            oProgressCom = oSrcHd.resizeAndCloneTo(oTgtHd, cbTgtSize, (vboxcon.MediumVariant_Standard, ), None);
    135134        except:
    136             reporter.errorXcpt('failed to resize and clone medium %s to %s and to size %d' % (oSrcHd.name, oTgtHd.name, cbTgtSize));
     135            reporter.errorXcpt('failed to resize and clone medium %s to %s and to size %d' \
     136                               % (oSrcHd.name, oTgtHd.name, cbTgtSize));
    137137            return False;
    138138        oProgress = vboxwrappers.ProgressWrapper(oProgressCom, self.oTstDrv.oVBoxMgr, self.oTstDrv,
    139                                                  'resize and clone base disk %s to %s and to size %d' % (oSrcHd.name, oTgtHd.name, cbTgtSize));
     139                                                 'resize and clone base disk %s to %s and to size %d' \
     140                                                 % (oSrcHd.name, oTgtHd.name, cbTgtSize));
    140141        oProgress.wait(cMsTimeout = 15*60*1000); # 15 min
    141142        oProgress.logResult();
     
    235236
    236237    def testAll(self):
    237         return (self.testCloneOnly() & self.testResizeAndClone())
     238        return self.testCloneOnly() & self.testResizeAndClone()
    238239
    239240if __name__ == '__main__':
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