VirtualBox

Ignore:
Timestamp:
Jun 11, 2019 3:26:40 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131252
Message:

ValKit,++: Pylint 2.3.1 adjustments.

Location:
trunk/src/VBox/ValidationKit/testboxscript
Files:
3 edited

Legend:

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

    r76553 r79092  
    4848    Custom exception class
    4949    """
    50     pass
     50    pass;                               # pylint: disable=unnecessary-pass
    5151
    5252#
     
    6767    Debug logging, will later be disabled by default.
    6868    """
    69     if True is True:
     69    if True is True:                    # pylint: disable=comparison-with-itself
    7070        if sTsPrf is None: sTsPrf = utils.getTimePrefix();
    7171        print('[%s] %s' % (sTsPrf, sMessage,));
  • trunk/src/VBox/ValidationKit/testboxscript/testboxscript_real.py

    r79087 r79092  
    6767class TestBoxScriptException(Exception):
    6868    """ For raising exceptions during TestBoxScript.__init__. """
    69     pass;
     69    pass;                               # pylint: disable=unnecessary-pass
    7070
    7171
     
    401401        if sValue == 'false':
    402402            return False;
    403         if sValue != 'dunno' and sValue != 'none':
     403        if sValue not in  ('dunno', 'none',):
    404404            raise TestBoxException('Unexpected response "%s" to helper command "%s"' % (sValue, sCmd));
    405405        return fDunnoValue;
     
    453453                oWebm = oWmi.ConnectServer('.', 'root\\cimv2');
    454454                for oItem in oWebm.ExecQuery('SELECT * FROM Win32_ComputerSystemProduct'):
    455                     if oItem.UUID != None:
     455                    if oItem.UUID is not None:
    456456                        sUuid = str(uuid.UUID(oItem.UUID));
    457457            except:
     
    848848
    849849        # Refresh sign-on parameters, changes triggers sign-on.
    850         fNeedSignOn = (True if not self._fSignedOn or self._fNeedReSignOn else False)
     850        fNeedSignOn = not self._fSignedOn or self._fNeedReSignOn;
    851851        for item in self._ddSignOnParams:
    852852            if self._ddSignOnParams[item][self.FN] is None:
  • trunk/src/VBox/ValidationKit/testboxscript/testboxtasks.py

    r79087 r79092  
    430430                                            cwd        = self._oTestBoxScript.getPathSpill(),
    431431                                            universal_newlines = True,
    432                                             close_fds  = (False if utils.getHostOs() == 'win' else True),
     432                                            close_fds  = utils.getHostOs() != 'win',
    433433                                            preexec_fn = (None if utils.getHostOs() in ['win', 'os2']
    434434                                                          else os.setsid)); # pylint: disable=no-member
     
    842842            # Figure the destination name (in scripts).
    843843            sDstFile = webutils.getFilename(sArchive);
    844             if   len(sDstFile) < 1 \
     844            if   not sDstFile \
    845845              or re.search('[^a-zA-Z0-9 !#$%&\'()@^_`{}~.-]', sDstFile) is not None: # FAT charset sans 128-255 + '.'.
    846846                self._log('Malformed script zip filename: %s' % (sArchive,));
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