VirtualBox

Ignore:
Timestamp:
Nov 26, 2020 2:58:19 PM (4 years ago)
Author:
vboxsync
Message:

testmanager/partial-db-dump.py: Adding option for using LMZA instead of Deflate for compression. bugref:9788

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/db/partial-db-dump.py

    r86990 r86992  
    7676        oParser.add_option('--load-dump-into-database', dest = 'fLoadDumpIntoDatabase', action = 'store_true',
    7777                           default = False, help = 'For loading instead of dumping.');
     78        oParser.add_option('--lmza', dest = 'fLmza', action = 'store_true',
     79                           default = False, help = 'Use LMZA instead of Deflate compression.');
    7880
    7981        (self.oConfig, _) = oParser.parse_args();
     
    140142        """ Does the dumping of the database. """
    141143
    142         oZipFile = zipfile.ZipFile(self.oConfig.sFilename, 'w', zipfile.ZIP_DEFLATED);
     144        enmCompression = zipfile.ZIP_DEFLATED;
     145        if self.oConfig.fLmza:
     146            enmCompression = getattr(zipfile. 'ZIP_LZMA', zipfile.ZIP_DEFLATED);
     147        oZipFile = zipfile.ZipFile(self.oConfig.sFilename, 'w', enmCompression);
    143148
    144149        oDb.begin();
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