VirtualBox

Ignore:
Timestamp:
Jan 10, 2018 3:49:10 PM (7 years ago)
Author:
vboxsync
Message:

ValidationKit: More python 3 adjustments.

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

Legend:

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

    r69111 r70521  
    246246        return sFileId;
    247247
    248     def mkDir(self, sDir, fMode = 0700, cMsTimeout = 30000):
     248    def mkDir(self, sDir, fMode = 0o700, cMsTimeout = 30000):
    249249        """
    250250        Creates a new directory at the given location.
  • trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py

    r66580 r70521  
    319319                sFdiskScript = ';\n'; # Single partition filling everything
    320320                if cbVol is not None:
    321                     sFdiskScript = ',' + str(cbVol / 512) + '\n'; # Get number of sectors
     321                    sFdiskScript = ',' + str(cbVol // 512) + '\n'; # Get number of sectors
    322322                fRc = oExec.execBinaryNoStdOut('sfdisk', ('--no-reread', '--wipe', 'always', '-q', '-f', sDiskPath), \
    323323                                               sFdiskScript);
     
    430430        if fRc:
    431431            self.oStorOs = oStorOs;
    432             if isinstance(oDiskCfg, basestring):
     432            if utils.isString(oDiskCfg):
    433433                self.lstDisks = oStorOs.getDisksMatchingRegExp(oDiskCfg);
    434434            else:
     
    591591        return fRc;
    592592
    593     def mkDirOnVolume(self, sMountPoint, sDir, fMode = 0700):
     593    def mkDirOnVolume(self, sMountPoint, sDir, fMode = 0o700):
    594594        """
    595595        Creates a new directory on the volume pointed to by the given mount point.
  • trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py

    r68710 r70521  
    10681068                if sMountPoint is not None:
    10691069                    # Create a directory where every normal user can write to.
    1070                     self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', 0777);
     1070                    self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', 0o777);
    10711071                    sDiskPath = sMountPoint + '/test';
    10721072                else:
     
    13121312                        reporter.testFailure('Failed to prepare host storage');
    13131313                        fRc = False;
    1314                     self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', 0777);
     1314                    self.oStorCfg.mkDirOnVolume(sMountPoint, 'test', 0o777);
    13151315                    sMountPoint = sMountPoint + '/test';
    13161316                    reporter.testDone();
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