VirtualBox

Ignore:
Timestamp:
Feb 15, 2022 11:03:25 PM (3 years ago)
Author:
vboxsync
Message:

vsheriff: Try fix image hashing error with python 3 and newer Pillow versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/batch/virtual_test_sheriff.py

    r93771 r93772  
    272272                try:
    273273                    oHash = hashlib.sha256();
    274                     if sys.version_info < (3, 9, 0):
    275                         # Removed since Python 3.9.
     274                    if hasattr(oImage, 'tobytes'):
     275                        oHash.update(oImage.tobytes());
     276                    else:
    276277                        oHash.update(oImage.tostring()); # pylint: disable=no-member
    277                     else:
    278                         oHash.update(oImage.tobytes());
    279278                except Exception as oXcpt:
    280279                    self.oSheriff.vprint(u'Error hashing the uncompressed image bytes for "%s": %s' % (oFile.sFile, oXcpt,))
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