VirtualBox

Changeset 84213 in vbox for trunk/src


Ignore:
Timestamp:
May 8, 2020 1:28:15 PM (5 years ago)
Author:
vboxsync
Message:

Validation Kit/tdAddGuestCtrl: Ancient versions of Python (< 2.7) don't have memoryview.

File:
1 edited

Legend:

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

    r84206 r84213  
    22572257                                        reporter.log2('Process (PID %d) got %d bytes of %s data (type: %s)'
    22582258                                                      % (iPid, len(abBuf), sFdNm, type(abBuf)));
    2259                                         if isinstance(abBuf, memoryview): ## @todo Why is this happening?
    2260                                             abBuf = abBuf.tobytes();
     2259                                        if isinstance(abBuf, str):
     2260                                            pass;
     2261                                        if sys.version_info >= (2, 7):
     2262                                            if isinstance(abBuf, memoryview): ## @todo Why is this happening?
     2263                                                abBuf = abBuf.tobytes();
    22612264                                        for sLine in abBuf.decode("utf-8").splitlines():
    22622265                                            reporter.log('%s: %s' % (sFdNm, sLine));
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