VirtualBox

Changeset 70709 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Jan 23, 2018 3:27:27 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120452
Message:

common/utils.py: Untar fix for python 3.6 and later.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/utils.py

    r70660 r70709  
    18561856g_fTarCopyFileObjOverriddend = False;
    18571857
    1858 def __mytarfilecopyfileobj(src, dst, length = None, exception = OSError):
     1858def __mytarfilecopyfileobj(src, dst, length = None, exception = OSError, bufsize = None):
    18591859    """ tarfile.copyfileobj with different buffer size (16384 is slow on windows). """
    18601860    if length is None:
     
    18961896        if g_fTarCopyFileObjOverriddend is False:
    18971897            g_fTarCopyFileObjOverriddend = True;
     1898            #if sys.hexversion < 0x03060000:
    18981899            tarfile.copyfileobj = __mytarfilecopyfileobj;
    18991900
     
    19041905    #       That's how we got a 13 min unpack time for VBoxAll on windows (hardlinked pdb).
    19051906    #
    1906     try: oTarFile = tarfile.open(sArchive, 'r|*', bufsize = g_cbGoodBufferSize);
     1907    try:
     1908        if sys.hexversion >= 0x03060000:
     1909            oTarFile = tarfile.open(sArchive, 'r|*', bufsize = g_cbGoodBufferSize, copybufsize = g_cbGoodBufferSize);
     1910        else:
     1911            oTarFile = tarfile.open(sArchive, 'r|*', bufsize = g_cbGoodBufferSize);
    19071912    except Exception as oXcpt:
    19081913        fnError('Error opening "%s" for unpacking into "%s": %s' % (sArchive, sDstDir, oXcpt,));
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