VirtualBox

Changeset 79474 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 2, 2019 4:47:30 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131738
Message:

ValKit/txsclient.py: Added string escape function. bugref:9151

File:
1 edited

Legend:

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

    r79447 r79474  
    121121def u32ToByteArray(u32):
    122122    """Encodes the u32 value as a little endian byte (B) array."""
    123     return array.array('B', \
    124                        (  u32              % 256, \
    125                          (u32 // 256)      % 256, \
    126                          (u32 // 65536)    % 256, \
     123    return array.array('B',
     124                       (  u32              % 256,
     125                         (u32 // 256)      % 256,
     126                         (u32 // 65536)    % 256,
    127127                         (u32 // 16777216) % 256) );
     128
     129def escapeString(sString):
     130    """
     131    Does $ escaping of the string so TXS doesn't try do variable expansion.
     132    """
     133    return sString.replace('$', '$$');
    128134
    129135
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