VirtualBox

Changeset 90740 in vbox


Ignore:
Timestamp:
Aug 19, 2021 9:42:27 AM (3 years ago)
Author:
vboxsync
Message:

ValKit: More Python 3.9 API changes needed (array.array.tostring() -> .tobytes()) ​bugref:10079

File:
1 edited

Legend:

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

    r90595 r90740  
    7272        abStr = abData[off:(off + cchStr)];
    7373        try:
    74             return abStr.tostring().decode('utf_8');
     74            if sys.version_info < (3, 9, 0):
     75                # Removed since Python 3.9.
     76                sStr = abStr.tostring(); # pylint: disable=no-member
     77            else:
     78                sStr = abStr.tobytes();
     79            return sStr.decode('utf_8');
    7580        except:
    7681            reporter.errorXcpt('getSZ(,%u)' % (off));
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