VirtualBox

Changeset 61831 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Jun 22, 2016 9:06:11 PM (9 years ago)
Author:
vboxsync
Message:

txsclient.py,usbgadget.py: pylint 1.5.5 fixes

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/txsclient.py

    r60853 r61831  
    201201        """
    202202        _ = cb; _ = cMsTimeout; _ = fNoDataOk;
    203         return False;
     203        return None;
    204204
    205205    def isConnectionOk(self):
     
    551551        so the client can inspect it later on.
    552552        """
    553         if cMsTimeout == None:
     553        if cMsTimeout is None:
    554554            cMsTimeout = self.getMsLeft(500);
    555555        cbMsg, sOpcode, abPayload = self.oTransport.recvMsg(cMsTimeout, fNoDataOk);
     
    613613        Wrapper for TransportBase.sendMsg that inserts the correct timeout.
    614614        """
    615         if cMsTimeout == None:
     615        if cMsTimeout is None:
    616616            cMsTimeout = self.getMsLeft(500);
    617617        return self.oTransport.sendMsg(sOpcode, cMsTimeout, aoPayload);
     
    768768                if cbMsg is None:
    769769                    cbMsg, sOpcode, abPayload = self.recvReply(cMsTimeout=500, fNoDataOk=True);
    770                     if cbMsg == None:
     770                    if cbMsg is None:
    771771                        # Check for time out before restarting the loop.
    772772                        # Note! Only doing timeout checking here does mean that
     
    865865            # Parse the exit status (True), abort (None) or do nothing (False).
    866866            if rc is True:
    867                 if sOpcode == 'PROC OK':
    868                     rc = True;
    869                 else:
     867                if sOpcode != 'PROC OK':
    870868                    # Do proper parsing some other day if needed:
    871869                    #   PROC TOK, PROC TOA, PROC DWN, PROC DOO,
     
    10751073                # Convert to array - this is silly!
    10761074                abBuf = array.array('B');
    1077                 for i in range(len(sRaw)):
     1075                for i, _ in enumerate(sRaw):
    10781076                    abBuf.append(ord(sRaw[i]));
    10791077                sRaw = None;
     
    13481346        oStdErr   = reporter.FileWrapper('%sstderr' % sPrefix);
    13491347        if fWithTestPipe:   oTestPipe = reporter.FileWrapperTestPipe();
    1350         else:               oTestPipe = '/dev/null';
     1348        else:               oTestPipe = '/dev/null'; # pylint: disable=redefined-variable-type
    13511349
    13521350        return self.startTask(cMsTimeout, fIgnoreErrors, "exec", self.taskExecEx,
  • trunk/src/VBox/ValidationKit/tests/usb/usbgadget.py

    r60794 r61831  
    293293        """
    294294        _ = cb; _ = cMsTimeout; _ = fNoDataOk;
    295         return False;
     295        return None;
    296296
    297297    def isConnectionOk(self):
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