VirtualBox

Ignore:
Timestamp:
Nov 25, 2020 2:38:52 PM (4 years ago)
Author:
vboxsync
Message:

testmanager: Attempted python 3 upload fix. bugref:9788

Location:
trunk/src/VBox/ValidationKit/testmanager/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/core/testboxcontroller.py

    r82968 r86974  
    730730
    731731        offFile  = 0;
    732         oSrcFile = self._oSrvGlue.getBodyIoStream();
     732        oSrcFile = self._oSrvGlue.getBodyIoStreamBinary();
    733733        while offFile < cbFile:
    734734            cbToRead = cbFile - offFile;
  • trunk/src/VBox/ValidationKit/testmanager/core/webservergluebase.py

    r84604 r86974  
    280280        raise WebServerGlueException('getUrlPath is not implemented');
    281281
     282    def getBodyIoStreamBinary(self):
     283        """
     284        Returns file object for reading the binary HTML body.
     285        """
     286        raise WebServerGlueException('getBodyIoStreamBinary is not implemented');
     287
    282288    #
    283289    # Output stuff.
  • trunk/src/VBox/ValidationKit/testmanager/core/webservergluecgi.py

    r82968 r86974  
    8484        return sys.stdin;
    8585
     86    def getBodyIoStreamBinary(self):
     87        # Python 3: sys.stdin.read() returns a string. To get untranslated
     88        #           binary data we use the sys.stdin.buffer object instead.
     89        return getattr(sys.stdin, 'buffer', sys.stdin);
     90
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