VirtualBox

Changeset 98655 in vbox


Ignore:
Timestamp:
Feb 20, 2023 3:05:40 PM (2 years ago)
Author:
vboxsync
Message:

ValKit: Pylint 2.16.2 adjustments.

Location:
trunk/src/VBox/ValidationKit
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testboxscript/testboxcommand.py

    r98651 r98655  
    192192                try:
    193193                    utils.sudoProcessOutputChecked(asCmd2);
    194                 except Exception as oXcpt:
    195                     testboxcommons.log('Error executing reboot command "%s" as well as "%s": %s' % (asCmd, asCmd2, oXcpt));
     194                except Exception as oXcpt2:
     195                    testboxcommons.log('Error executing reboot command "%s" as well as "%s": %s' % (asCmd, asCmd2, oXcpt2));
    196196                    return False;
    197197            testboxcommons.log('Error executing reboot command "%s": %s' % (asCmd, oXcpt));
     
    251251            self.doReboot();
    252252        sys.exit(TBS_EXITCODE_NEED_UPGRADE);
    253         return False;                   # shuts up pylint (it will probably complain later when it learns DECL_NO_RETURN).
     253        return False;  # shuts up older pylint. 2.16.2+:  pylint: disable=unreachable
    254254
    255255    def _cmdUpgrade(self, oResponse, oConnection):
  • trunk/src/VBox/ValidationKit/testboxscript/testboxcommons.py

    r98103 r98655  
    7777    Debug logging, will later be disabled by default.
    7878    """
    79     if True is True:                    # pylint: disable=comparison-with-itself
     79    if True is True:                    # pylint: disable=comparison-with-itself,comparison-of-constants
    8080        if sTsPrf is None: sTsPrf = utils.getTimePrefix();
    8181        print('[%s] %s' % (sTsPrf, sMessage,));
  • trunk/src/VBox/ValidationKit/testboxscript/testboxscript.py

    r98651 r98655  
    113113                break;
    114114        if sPidFile:
    115             with open(sPidFile, 'w') as oPidFile:
     115            with open(sPidFile, 'w') as oPidFile:   # pylint: disable=unspecified-encoding
    116116                oPidFile.write(str(os.getpid()));
    117117
  • trunk/src/VBox/ValidationKit/testboxscript/testboxupgrade.py

    r98651 r98655  
    214214                    try:
    215215                        shutil.copy(sDst, sDstRm);
    216                     except Exception as oXcpt:
    217                         testboxcommons.log('Error: failed to copy (old) "%s" to "%s": %s' % (sDst, sDstRm, oXcpt));
     216                    except Exception as oXcpt2:
     217                        testboxcommons.log('Error: failed to copy (old) "%s" to "%s": %s' % (sDst, sDstRm, oXcpt2));
    218218                        break;
    219219                    try:
    220220                        os.unlink(sDst);
    221                     except Exception as oXcpt:
    222                         testboxcommons.log('Error: failed to unlink (old) "%s": %s' % (sDst, oXcpt));
     221                    except Exception as oXcpt2:
     222                        testboxcommons.log('Error: failed to unlink (old) "%s": %s' % (sDst, oXcpt2));
    223223                        break;
    224224
     
    231231                try:
    232232                    shutil.copy(sSrc, sDst);
    233                 except:
    234                     testboxcommons.log('Error: failed to copy (new) "%s" to "%s": %s' % (sSrc, sDst, oXcpt));
     233                except Exception as oXcpt2:
     234                    testboxcommons.log('Error: failed to copy (new) "%s" to "%s": %s' % (sSrc, sDst, oXcpt2));
    235235                    fRc = False;
    236236                    break;
  • trunk/src/VBox/ValidationKit/testdriver/base.py

    r98651 r98655  
    437437    def lockTask(self):
    438438        """ Wrapper around oCv.acquire(). """
    439         if True is True: # change to False for debugging deadlocks. # pylint: disable=comparison-with-itself
     439        # Change this to False for debugging deadlocks.
     440        if True is True: # pylint: disable=comparison-with-itself,comparison-of-constants
    440441            self.oCv.acquire();
    441442        else:
     
    654655                    try:
    655656                        if hasattr(self.hWin, '__int__'): # Needed for newer pywin32 versions.
    656                             (uPid, uStatus) = os.waitpid(self.hWin.__int__(), 0);
     657                            (uPid, uStatus) = os.waitpid(self.hWin.__int__(), 0); # pylint: disable=unnecessary-dunder-call
    657658                        else:
    658659                            (uPid, uStatus) = os.waitpid(self.hWin, 0);
     
    10791080        except:
    10801081            return None;
    1081         else:
    1082             oTask.setTaskOwner(None);
     1082        oTask.setTaskOwner(None);
    10831083        #reporter.log2('tasks left: %d - %s' % (len(self.aoTasks), self.aoTasks));
    10841084        return oTask;
  • trunk/src/VBox/ValidationKit/testdriver/txsclient.py

    r98588 r98655  
    484484        self.fnTask         = fnTask;
    485485        self.aTaskArgs      = aArgs;
    486         self.oThread        = threading.Thread(target=self.taskThread, args=(), name=('TXS-%s' % (sStatus)));
     486        self.oThread        = threading.Thread(target=self.taskThread, args=(), name='TXS-%s' % (sStatus));
    487487        self.oThread.setDaemon(True); # pylint: disable=deprecated-method
    488488        self.msStart        = base.timestampMilli();
     
    527527        if sys.version_info < (3, 9, 0):
    528528            # Removed since Python 3.9.
    529             return oThread.isAlive(); # pylint: disable=no-member
     529            return oThread.isAlive(); # pylint: disable=no-member,deprecated-method
    530530        return oThread.is_alive();
    531531
     
    11891189                abBuf = array.array('B');
    11901190                if utils.isString(sRaw):
    1191                     for i, _ in enumerate(sRaw):
    1192                         abBuf.append(ord(sRaw[i]));
     1191                    for ch in sRaw:
     1192                        abBuf.append(ord(ch));
    11931193                else:
    11941194                    abBuf.extend(sRaw);
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r98651 r98655  
    556556        Called when working in passive mode.
    557557        """
    558         self.oThread = threading.Thread(target = self.threadForPassiveMode, \
    559             args=(), name=('PAS-%s' % (self.sName,)));
     558        self.oThread = threading.Thread(target = self.threadForPassiveMode, args=(), name='PAS-%s' % (self.sName,) );
    560559        self.oThread.setDaemon(True); # pylint: disable=deprecated-method
    561560        self.oThread.start();
     
    617616                oRet = oVBoxMgr.createCallback(sICallbackNm, oSubClass, dArgsCopy);
    618617            except:
    619                 reporter.errorXcpt('%s::registerCallback(%s) failed%s' % (sSrcParentNm, oRet, sLogSuffix));
     618                reporter.errorXcpt('%s::createCallback(%s) failed%s' % (sSrcParentNm, sICallbackNm, sLogSuffix,));
    620619            else:
    621620                try:
     
    624623                except Exception as oXcpt:
    625624                    if fMustSucceed or ComError.notEqual(oXcpt, ComError.E_UNEXPECTED):
    626                         reporter.errorXcpt('%s::registerCallback(%s)%s' % (sSrcParentNm, oRet, sLogSuffix));
     625                        reporter.errorXcpt('%s::registerCallback(%s)%s' % (sSrcParentNm, oRet, sLogSuffix,));
    627626        else:
    628627            #
     
    944943
    945944        # Try dev build first since that's where I'll be using it first...
    946         if True is True: # pylint: disable=comparison-with-itself
     945        if True is True: # pylint: disable=comparison-with-itself,comparison-of-constants
    947946            try:
    948947                self.oBuild = Build(self, None);
  • trunk/src/VBox/ValidationKit/testdriver/vboxinstaller.py

    r98651 r98655  
    361361            # Are any of the debugger processes hooked up to a VBox process?
    362362            if sHostOs == 'windows':
    363                 # On demand debugging windows: windbg -p <decimal-pid> -e <decimal-event> -g
    364                 for oDebugger in aoDebuggers:
    365                     for oProcess in aoTodo:
     363                def isDebuggerDebuggingVBox(oDebugger, aoVBoxProcesses):
     364                    for oProcess in aoVBoxProcesses:
    366365                        # The whole command line is asArgs[0] here. Fix if that changes.
    367366                        if oDebugger.asArgs and oDebugger.asArgs[0].find('-p %s ' % (oProcess.iPid,)) >= 0:
    368                             aoTodo.append(oDebugger);
    369                             break;
     367                            return True;
     368                    return False;
    370369            else:
    371                 for oDebugger in aoDebuggers:
    372                     for oProcess in aoTodo:
     370                def isDebuggerDebuggingVBox(oDebugger, aoVBoxProcesses):
     371                    for oProcess in aoVBoxProcesses:
    373372                        # Simplistic approach: Just check for argument equaling our pid.
    374373                        if oDebugger.asArgs and ('%s' % oProcess.iPid) in oDebugger.asArgs:
    375                             aoTodo.append(oDebugger);
    376                             break;
     374                            return True;
     375                    return False;
     376            for oDebugger in aoDebuggers:
     377                if isDebuggerDebuggingVBox(oDebugger, aoTodo):
     378                    aoTodo.append(oDebugger);
    377379
    378380            # Kill.
     
    586588            fRc = fRc2;
    587589
    588         reporter.testDone(fSkipped = (fRc is None));
     590        reporter.testDone(fSkipped = fRc is None);
    589591        return fRc;
    590592
  • trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py

    r98616 r98655  
    18901890                        cTests = cTests + (rc2 is not None);
    18911891                        if sParavirtMode is not None:
    1892                             reporter.testDone(fSkipped = (rc2 is None));
     1892                            reporter.testDone(fSkipped = rc2 is None);
    18931893
    18941894                    reporter.testDone(fSkipped = cTests == cStartTests);
  • trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py

    r98103 r98655  
    526526        they don't throw errors.
    527527        """
    528         if True is True: # pylint: disable=comparison-with-itself
     528        if True is True: # pylint: disable=comparison-with-itself,comparison-of-constants
    529529            try:
    530530                iPct        = self.o.operationPercent;
     
    18371837                    reporter.errorXcpt('addStorageController("%s",%s) failed on "%s"' % (sController, eBus, self.sName) );
    18381838                    return False;
    1839                 else:
    1840                     try:
    1841                         oCtl.controllerType = eType;
    1842                         reporter.log('added storage controller "%s" (bus %s, type %s) to %s'
    1843                                     % (sController, eBus, eType, self.sName));
    1844                     except:
    1845                         reporter.errorXcpt('controllerType = %s on ("%s" / %s) failed on "%s"'
    1846                                            % (eType, sController, eBus, self.sName) );
    1847                         return False;
     1839                try:
     1840                    oCtl.controllerType = eType;
     1841                    reporter.log('added storage controller "%s" (bus %s, type %s) to %s'
     1842                                % (sController, eBus, eType, self.sName));
     1843                except:
     1844                    reporter.errorXcpt('controllerType = %s on ("%s" / %s) failed on "%s"'
     1845                                       % (eType, sController, eBus, self.sName) );
     1846                    return False;
    18481847        finally:
    18491848            self.oTstDrv.processPendingEvents();
     
    24742473            sValue = self.o.machine.getExtraData(sKey)
    24752474        except:
    2476             reporter.errorXcpt('IMachine::setExtraData("%s","%s") failed' % (sKey, sValue))
     2475            reporter.errorXcpt('IMachine::getExtraData("%s") failed' % (sKey,))
    24772476            return None
    24782477        return sValue
     
    32893288                self._deregisterEventHandler();
    32903289                raise;
    3291             else:
    3292                 if sIpAddr is not None:
    3293                     self._setIp(sIpAddr);
     3290            if sIpAddr is not None:
     3291                self._setIp(sIpAddr);
    32943292
    32953293            #
  • trunk/src/VBox/ValidationKit/testdriver/winbase.py

    r98103 r98655  
    142142        reporter.logXcpt('uPid=%s oXcpt=%s' % (uPid, oXcpt));
    143143    except Exception as oXcpt:
    144         reporter.logXcpt('uPid=%s' % (uPid,));
     144        reporter.logXcpt('uPid=%s oXcpt=%s' % (uPid, oXcpt));
    145145        return False;
    146146    else:
  • trunk/src/VBox/ValidationKit/testmanager/batch/del_build.py

    r98103 r98655  
    8484                sys.exit(1);
    8585            raise;
    86         else:
    87             if not oConfig.fQuiet:
    88                 print("del_build.py: Marked %u builds associated with '%s' as deleted." % (cBuilds, sBuildBin,));
     86        if not oConfig.fQuiet:
     87            print("del_build.py: Marked %u builds associated with '%s' as deleted." % (cBuilds, sBuildBin,));
    8988
    9089    oDb.close()
  • trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py

    r98645 r98655  
    12921292
    12931293        # Generalistic fallbacks:
    1294         for sKey in self.kdGATestFallbacks:
     1294        for sKey in utils.iteritems(self.kdGATestFallbacks):
    12951295            oTmpFailedResult = oFailedResult;
    12961296            while oTmpFailedResult:
     
    14341434                for sNeedle, fnHandler in self.katInfoTextHandlers:
    14351435                    if sInfoText.find(sNeedle) > 0:
    1436                         (fStop, tReason) = fnHandler(self, oCaseFile, sInfoText, dLogs);
     1436                        (fStop, tReason) = fnHandler(self, oCaseFile, sInfoText, dLogs);# ? pylint: disable=too-many-function-args
    14371437                        if tReason is not None:
    14381438                            oCaseFile.noteReasonForId(tReason, oFailedResult.idTestResult);
  • trunk/src/VBox/ValidationKit/testmanager/core/base.py

    r98103 r98655  
    247247        elif isinstance(oValue, list) and oValue and isinstance(oValue[0], ModelDataBase):
    248248            oValue = copy.copy(oValue);
    249             for i, _ in enumerate(oValue):
    250                 assert isinstance(oValue[i], ModelDataBase);
    251                 oValue[i] = copy.copy(oValue[i]);
     249            for i, oSubValue in enumerate(oValue):
     250                assert isinstance(oSubValue, ModelDataBase);
     251                oValue[i] = copy.copy(oSubValue);
    252252                oValue[i].convertFromParamNull();
    253253
     
    283283        elif isinstance(oValue, list) and oValue and isinstance(oValue[0], ModelDataBase):
    284284            oValue = copy.copy(oValue);
    285             for i, _ in enumerate(oValue):
    286                 assert isinstance(oValue[i], ModelDataBase);
    287                 oValue[i] = copy.copy(oValue[i]);
     285            for i, oSubValue in enumerate(oValue):
     286                assert isinstance(oSubValue, ModelDataBase);
     287                oValue[i] = copy.copy(oSubValue);
    288288                oValue[i].convertToParamNull();
    289289
  • trunk/src/VBox/ValidationKit/testmanager/core/dbobjcache.py

    r98103 r98655  
    120120            try:    oRet.initFromDbWithId(self._oDb, idTestBox, self.tsNow, self.sPeriodBack);
    121121            except: self._handleDbException(); raise;
    122             else:   self._adCache[self.ksObjType_TestBox_idGenTestBox][oRet.idGenTestBox] = oRet;
     122            self._adCache[self.ksObjType_TestBox_idGenTestBox][oRet.idGenTestBox] = oRet;
    123123            self._adCache[self.ksObjType_TestBox_idTestBox][idTestBox] = oRet;
    124124        return oRet;
     
    133133            try:    oRet.initFromDbWithId(self._oDb, idTestCase, self.tsNow, self.sPeriodBack);
    134134            except: self._handleDbException(); raise;
    135             else:   self._adCache[self.ksObjType_TestCase_idGenTestCase][oRet.idGenTestCase] = oRet;
     135            self._adCache[self.ksObjType_TestCase_idGenTestCase][oRet.idGenTestCase] = oRet;
    136136            self._adCache[self.ksObjType_TestCase_idTestCase][idTestCase] = oRet;
    137137        return oRet;
     
    146146            try:    oRet.initFromDbWithId(self._oDb, idTestCaseArgs, self.tsNow, self.sPeriodBack);
    147147            except: self._handleDbException(); raise;
    148             else:   self._adCache[self.ksObjType_TestCaseArgs_idGenTestCaseArgs][oRet.idGenTestCaseArgs] = oRet;
     148            self._adCache[self.ksObjType_TestCaseArgs_idGenTestCaseArgs][oRet.idGenTestCaseArgs] = oRet;
    149149            self._adCache[self.ksObjType_TestCaseArgs_idTestCaseArgs][idTestCaseArgs] = oRet;
    150150        return oRet;
  • trunk/src/VBox/ValidationKit/testmanager/core/schedgroup.py

    r98103 r98655  
    408408
    409409            if not asErrors:
    410                 for i, _ in enumerate(aoNewMembers):
    411                     idTestGroup = aoNewMembers[i];
     410                for i, idTestGroup in enumerate(aoNewMembers):
    412411                    for j in range(i + 1, len(aoNewMembers)):
    413412                        if aoNewMembers[j].idTestGroup == idTestGroup:
     
    428427
    429428            if not asErrors:
    430                 for i, _ in enumerate(aoNewMembers):
    431                     idTestBox = aoNewMembers[i];
     429                for i, idTestBox in enumerate(aoNewMembers):
    432430                    for j in range(i + 1, len(aoNewMembers)):
    433431                        if aoNewMembers[j].idTestBox == idTestBox:
  • trunk/src/VBox/ValidationKit/testmanager/core/schedulerbase.py

    r98103 r98655  
    452452            def next(self):
    453453                """ For python 2.x. """
    454                 return self.__next__();
     454                return self.__next__();     # pylint: disable=unnecessary-dunder-call
    455455
    456456        class BuildCacheEntry(object):
     
    789789
    790790        sArgs = ' --gang-member-no %s --gang-members %s' % (oTestSet.iGangMemberNo, len(aoGangMembers));
    791         for i, _ in enumerate(aoGangMembers):
    792             sArgs = ' --gang-ipv4-%s %s' % (i, aoGangMembers[i].ip); ## @todo IPv6
     791        for i, sIp in enumerate(aoGangMembers):
     792            sArgs = ' --gang-ipv4-%s %s' % (i, sIp); ## @todo IPv6
    793793
    794794        return sArgs;
  • trunk/src/VBox/ValidationKit/testmanager/core/testgroup.py

    r98103 r98655  
    367367
    368368        if not asErrors:
    369             for i, _ in enumerate(aoNewMembers):
    370                 idTestCase = aoNewMembers[i];
     369            for i, idTestCase in enumerate(aoNewMembers):
    371370                for j in range(i + 1, len(aoNewMembers)):
    372371                    if aoNewMembers[j].idTestCase == idTestCase:
  • trunk/src/VBox/ValidationKit/testmanager/core/testresults.py

    r98103 r98655  
    23262326        """Returns a string rep of the stack."""
    23272327        sRet = '';
    2328         for i, _ in enumerate(aoStack):
    2329             sRet += 'aoStack[%d]=%s\n' % (i, aoStack[i]);
     2328        for i, oFrame in enumerate(aoStack):
     2329            sRet += 'aoStack[%d]=%s\n' % (i, oFrame);
    23302330        return sRet;
    23312331
     
    23442344            aoStack.append(TestResultData().initFromDbRow(aoRow));
    23452345
    2346         for i, _ in enumerate(aoStack):
    2347             assert aoStack[i].iNestingDepth == len(aoStack) - i - 1, self._stringifyStack(aoStack);
     2346        for i, oFrame in enumerate(aoStack):
     2347            assert oFrame.iNestingDepth == len(aoStack) - i - 1, self._stringifyStack(aoStack);
    23482348
    23492349        return aoStack;
  • trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py

    r98103 r98655  
    603603            fnWrite('<h2>%s</h2>\n'
    604604                    '<table border="1"><tr><th>index</th><th>value</th></tr>\n' % (sName,));
    605             for i, _ in enumerate(aoStuff):
    606                 fnWrite('  <tr><td>' + str(i) + '</td><td>' + webutils.escapeElem(str(aoStuff[i])) + '</td></tr>\n');
     605            for i, oStuff in enumerate(aoStuff):
     606                fnWrite('  <tr><td>' + str(i) + '</td><td>' + webutils.escapeElem(str(oStuff)) + '</td></tr>\n');
    607607            fnWrite('</table>\n');
    608608        else:
  • trunk/src/VBox/ValidationKit/testmanager/webui/wuicontentbase.py

    r98103 r98655  
    890890        assert len(aoValues) == len(self._asColumnHeaders), '%s vs %s' % (len(aoValues), len(self._asColumnHeaders));
    891891
    892         for i, _ in enumerate(aoValues):
     892        for i, oValue in enumerate(aoValues):
    893893            if i < len(self._asColumnAttribs) and self._asColumnAttribs[i]:
    894894                sRow += u'    <td ' + self._asColumnAttribs[i] + '>';
     
    896896                sRow += u'    <td>';
    897897
    898             if isinstance(aoValues[i], WuiHtmlBase):
    899                 sRow += aoValues[i].toHtml();
    900             elif isinstance(aoValues[i], list):
    901                 if aoValues[i]:
    902                     for oElement in aoValues[i]:
     898            if isinstance(oValue, WuiHtmlBase):
     899                sRow += oValue.toHtml();
     900            elif isinstance(oValue, list):
     901                if oValue:
     902                    for oElement in oValue:
    903903                        if isinstance(oElement, WuiHtmlBase):
    904904                            sRow += oElement.toHtml();
     
    908908                            sRow += webutils.escapeElem(unicode(oElement));
    909909                        sRow += ' ';
    910             elif db.isDbTimestamp(aoValues[i]):
    911                 sRow += webutils.escapeElem(self.formatTsShort(aoValues[i]));
    912             elif db.isDbInterval(aoValues[i]):
    913                 sRow += webutils.escapeElem(self.formatIntervalShort(aoValues[i]));
    914             elif aoValues[i] is not None:
    915                 sRow += webutils.escapeElem(unicode(aoValues[i]));
     910            elif db.isDbTimestamp(oValue):
     911                sRow += webutils.escapeElem(self.formatTsShort(oValue));
     912            elif db.isDbInterval(oValue):
     913                sRow += webutils.escapeElem(self.formatIntervalShort(oValue));
     914            elif oValue is not None:
     915                sRow += webutils.escapeElem(unicode(oValue));
    916916
    917917            sRow += u'</td>\n';
  • trunk/src/VBox/ValidationKit/testmanager/webui/wuihlpform.py

    r98103 r98655  
    696696        oDefMember = TestGroupMemberData();
    697697        aoTestGroupMembers = list(aoTestGroupMembers); # Copy it so we can pop.
    698         for iTestCase, _ in enumerate(aoAllTestCases):
    699             oTestCase = aoAllTestCases[iTestCase];
     698        for iTestCase, oTestCase in enumerate(aoAllTestCases):
    700699
    701700            # Is it a member?
     
    807806        oDefMember = SchedGroupMemberData();
    808807        aoSchedGroupMembers = list(aoSchedGroupMembers); # Copy it so we can pop.
    809         for iTestGroup, _ in enumerate(aoAllRelevantTestGroups):
    810             oTestGroup = aoAllRelevantTestGroups[iTestGroup];
     808        for iTestGroup, oTestGroup in enumerate(aoAllRelevantTestGroups):
    811809
    812810            # Is it a member?
  • trunk/src/VBox/ValidationKit/testmanager/webui/wuihlpgraphmatplotlib.py

    r98103 r98655  
    157157
    158158        aoBars = [];
    159         for i, _ in enumerate(aoSeries):
     159        for i, oValue in enumerate(aoSeries):
    160160            sColor = self.calcSeriesColor(i);
    161161            aoBars.append(oSubPlot.bar(oXRange + self.cxBarWidth * i,
    162                                        aoSeries[i],
     162                                       oValue,
    163163                                       self.cxBarWidth,
    164164                                       color = sColor,
     
    176176        oSubPlot.grid(True);
    177177        fpPadding = (fpMax - fpMin) * 0.02;
    178         for i, _ in enumerate(aoBars):
    179             aoRects = aoBars[i]
    180             for j, _ in enumerate(aoRects):
    181                 oRect = aoRects[j];
     178        for i, aoRects in enumerate(aoBars):
     179            for j, oRect in enumerate(aoRects):
    182180                fpValue = float(aoTable[j + 1].aoValues[i]);
    183181                if fpValue <= fpMid:
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r98651 r98655  
    33773377                        oThreadReboot = threading.Thread(target = self.threadForTestGuestCtrlSessionReboot,
    33783378                                                         args = (oGuestProcess,),
    3379                                                          name = ('threadForTestGuestCtrlSessionReboot'));
     3379                                                         name = 'threadForTestGuestCtrlSessionReboot');
    33803380                        oThreadReboot.setDaemon(True); # pylint: disable=deprecated-method
    33813381                        oThreadReboot.start();
  • trunk/src/VBox/ValidationKit/tests/installation/tdGuestOsInstTest1.py

    r98651 r98655  
    312312        """
    313313
    314         if False is True:
     314        if False is True: # placeholder.    pylint: disable=comparison-of-constants
    315315            pass;
    316316        elif asArgs[iArg] == '--ioapic':
  • trunk/src/VBox/ValidationKit/tests/usb/usbgadget.py

    r98103 r98655  
    562562        self.fnTask         = fnTask;
    563563        self.aTaskArgs      = aArgs;
    564         self.oThread        = threading.Thread(target=self.taskThread, args=(), name=('UTS-%s' % (sStatus)));
     564        self.oThread        = threading.Thread(target=self.taskThread, args=(), name='UTS-%s' % (sStatus,));
    565565        self.oThread.setDaemon(True); # pylint: disable=deprecated-method
    566566        self.msStart        = base.timestampMilli();
     
    605605        if sys.version_info < (3, 9, 0):
    606606            # Removed since Python 3.9.
    607             return oThread.isAlive(); # pylint: disable=no-member
     607            return oThread.isAlive(); # pylint: disable=no-member,deprecated-method
    608608        return oThread.is_alive();
    609609
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