VirtualBox

Changeset 79663 in vbox


Ignore:
Timestamp:
Jul 10, 2019 8:41:29 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131971
Message:

ValitdationKit/tdStorageBenchmark1: Adjust for python

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

Legend:

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

    r79602 r79663  
    6464        if isinstance(sText, array.array):
    6565            try:
    66                 return sText.tostring();
     66                return str(sText.tostring()); # tostring() returns bytes with python3.
    6767            except:
    6868                pass;
    69         else:
    70             return sText;
     69        elif isinstance(sText, bytes):
     70            return sText.decode('utf-8');
     71
     72        return sText;
    7173
    7274    def read(self, cb):
  • trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py

    r79603 r79663  
    488488        if not self.oDiskCfg.isCfgStaticDir():
    489489            # Destroy all volumes first.
    490             for sMountPoint in self.dVols.keys(): # pylint: disable=consider-iterating-dictionary
     490            for sMountPoint in list(self.dVols.keys()): # pylint: disable=consider-iterating-dictionary
    491491                self.destroyVolume(sMountPoint);
    492492
    493493            # Destroy all pools.
    494             for sPool in self.dPools.keys(): # pylint: disable=consider-iterating-dictionary
     494            for sPool in list(self.dPools.keys()): # pylint: disable=consider-iterating-dictionary
    495495                self.destroyStoragePool(sPool);
    496496
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