VirtualBox

Ignore:
Timestamp:
May 27, 2020 3:58:24 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138301
Message:

Validation Kit/tdAddGuestCtrl.py: Try converting other data types to a string in limitString().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/tests/additions/tdAddGuestCtrl.py

    r84563 r84571  
    6666    """
    6767    if not isinstance(sString, str):
    68         return "";
     68        sString = str(sString);
    6969    cLen = len(sString);
     70    if not cLen:
     71        return cLen;
    7072    return (sString[:cLimit] + '...[%d more]' % (cLen - cLimit)) if cLen > cLimit else sString;
    7173
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