Changeset 79602 in vbox for trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py
- Timestamp:
- Jul 8, 2019 5:00:21 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/tests/storage/storagecfg.py
r79593 r79602 461 461 elif oDiskCfg.getTargetOs() == 'linux': 462 462 oStorOs = StorageConfigOsLinux(); # pylint: disable=redefined-variable-type 463 elif not oDiskCfg.isCfgStaticDir(): # For unknown hosts we only a static testing directory we don't care about setting up.463 elif not oDiskCfg.isCfgStaticDir(): # For unknown hosts we only allow a static testing directory we don't care about setting up. 464 464 fRc = False; 465 465 … … 472 472 for sDisk in oDiskCfg.getDisks(): 473 473 self.lstDisks.append(StorageDisk(sDisk)); 474 elif oDiskCfg.isCfgStaticDir(): 475 if not os.path.exists(oDiskCfg.getDisks()): 476 self.oExec.mkDir(oDiskCfg.getDisks(), 0o700); 474 477 475 478 def __del__(self): 476 479 self.cleanup(); 480 self.oDiskCfg = None; 477 481 478 482 def cleanup(self): … … 492 496 self.dVols.clear(); 493 497 self.dPools.clear(); 494 self.oDiskCfg = None;495 498 self.iPoolId = 0; 496 499 self.iVolId = 0; … … 654 657 655 658 fRc = True; 656 for sEntry in os.listdir(self.oDiskCfg.getDisks()): 657 fRc = fRc and self.oExec.rmTree(os.path.join(self.oDiskCfg.getDisks(), sEntry)); 658 659 return fRc; 659 if os.path.exists(self.oDiskCfg.getDisks()): 660 for sEntry in os.listdir(self.oDiskCfg.getDisks()): 661 fRc = fRc and self.oExec.rmTree(os.path.join(self.oDiskCfg.getDisks(), sEntry)); 662 663 return fRc;
Note:
See TracChangeset
for help on using the changeset viewer.