Changeset 97673 in vbox for trunk/src/VBox/ValidationKit/testdriver
- Timestamp:
- Nov 24, 2022 11:46:15 AM (2 years ago)
- Location:
- trunk/src/VBox/ValidationKit/testdriver
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/base.py
r97672 r97673 82 82 Returns the executable suffix. 83 83 """ 84 if os.name == 'nt' or os.name == 'os2':84 if os.name in ('nt', 'os2'): 85 85 return '.exe'; 86 86 return ''; … … 484 484 reporter.log2('signalTaskLocked(%s)' % (self,)); 485 485 self.fSignalled = True; 486 self.oCv.notifyAll() 486 self.oCv.notifyAll(); # pylint: disable=deprecated-method 487 487 if self.oOwner is not None: 488 488 self.oOwner.notifyAboutReadyTask(self); … … 1431 1431 self.asActions.append(asArgs[iArg]) 1432 1432 elif asArgs[iArg] in self.asSpecialActions: 1433 if self.asActions != []:1433 if self.asActions: 1434 1434 raise InvalidOption('selected special action "%s" already' % (self.asActions[0], )); 1435 1435 self.asActions = [ asArgs[iArg] ]; … … 1705 1705 raise InvalidOption('unknown option: %s' % (asArgs[iArg])) 1706 1706 iArg = iNext; 1707 except QuietInvalidOption as oXcpt:1707 except QuietInvalidOption: 1708 1708 return rtexitcode.RTEXITCODE_SYNTAX; 1709 1709 except InvalidOption as oXcpt: … … 1718 1718 return rtexitcode.RTEXITCODE_SYNTAX; 1719 1719 1720 if self.asActions == []:1720 if not self.asActions: 1721 1721 reporter.error('no action was specified'); 1722 1722 reporter.error('valid actions: %s' % (self.asNormalActions + self.asSpecialActions + ['all'])); … … 1790 1790 self.pidFileRemove(os.getpid()); 1791 1791 1792 if asActions != []and fRc is True:1792 if asActions and fRc is True: 1793 1793 reporter.error('unhandled actions: %s' % (asActions,)); 1794 1794 fRc = False; -
trunk/src/VBox/ValidationKit/testdriver/txsclient.py
r96407 r97673 485 485 self.aTaskArgs = aArgs; 486 486 self.oThread = threading.Thread(target=self.taskThread, args=(), name=('TXS-%s' % (sStatus))); 487 self.oThread.setDaemon(True); 487 self.oThread.setDaemon(True); # pylint: disable=deprecated-method 488 488 self.msStart = base.timestampMilli(); 489 489 -
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r97545 r97673 558 558 self.oThread = threading.Thread(target = self.threadForPassiveMode, \ 559 559 args=(), name=('PAS-%s' % (self.sName,))); 560 self.oThread.setDaemon(True) 560 self.oThread.setDaemon(True); # pylint: disable=deprecated-method 561 561 self.oThread.start(); 562 562 return None; … … 1981 1981 """ 1982 1982 sAdpName = ''; 1983 if oNic.adapterType == vboxcon.NetworkAdapterType_Am79C970A\1984 or oNic.adapterType == vboxcon.NetworkAdapterType_Am79C973\1985 or oNic.adapterType == vboxcon.NetworkAdapterType_Am79C960:1983 if oNic.adapterType in (vboxcon.NetworkAdapterType_Am79C970A, \ 1984 vboxcon.NetworkAdapterType_Am79C973, \ 1985 vboxcon.NetworkAdapterType_Am79C960): 1986 1986 sAdpName = 'pcnet'; 1987 elif oNic.adapterType == vboxcon.NetworkAdapterType_I82540EM\1988 or oNic.adapterType == vboxcon.NetworkAdapterType_I82543GC\1989 or oNic.adapterType == vboxcon.NetworkAdapterType_I82545EM:1987 elif oNic.adapterType in (vboxcon.NetworkAdapterType_I82540EM, \ 1988 vboxcon.NetworkAdapterType_I82543GC, \ 1989 vboxcon.NetworkAdapterType_I82545EM): 1990 1990 sAdpName = 'e1000'; 1991 1991 elif oNic.adapterType == vboxcon.NetworkAdapterType_Virtio: -
trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py
r96431 r97673 266 266 sFull = self.__persistentVarCalcName(sVar); 267 267 try: 268 with open(sFull, 'w') as oFile: 268 with open(sFull, 'w') as oFile: # pylint: disable=unspecified-encoding 269 269 if sValue: 270 270 oFile.write(sValue.encode('utf-8')); … … 318 318 return None; 319 319 try: 320 with open(sFull, 'r') as oFile: 320 with open(sFull, 'r') as oFile: # pylint: disable=unspecified-encoding 321 321 sValue = oFile.read().decode('utf-8'); 322 322 except: -
trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py
r96407 r97673 1554 1554 1555 1555 for oTestVm in self.aoTestVms: 1556 if oTestVm.sVmName == sVmName or oTestVm.sVmName == sAltName:1556 if oTestVm.sVmName in (sVmName, sAltName): 1557 1557 return oTestVm; 1558 1558 return None; -
trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
r96407 r97673 155 155 The new instance is returned on success. None is returned on error. 156 156 """ 157 dArgsCopy = dArgs.copy() if dArgs is not None else dict();157 dArgsCopy = dArgs.copy() if dArgs is not None else {}; 158 158 dArgsCopy['oVBox'] = self; 159 159 return oSubClass.registerDerivedEventHandler(self.oVBoxMgr, self.fpApiVer, oSubClass, dArgsCopy, … … 2868 2868 return False 2869 2869 2870 with open(sFilename, 'wb') as oFile: 2870 with open(sFilename, 'wb') as oFile: # pylint: disable=unspecified-encoding 2871 2871 oFile.write(aPngData) 2872 2872 … … 3103 3103 3104 3104 # Add the base class arguments. 3105 dArgsCopy = dArgs.copy() if dArgs is not None else dict();3105 dArgsCopy = dArgs.copy() if dArgs is not None else {}; 3106 3106 dArgsCopy['oSession'] = self; 3107 3107 dArgsCopy['oConsole'] = oConsole;
Note:
See TracChangeset
for help on using the changeset viewer.