From 54f9570a2298ab923a61e2be2c4fbff49c8c9dfa Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Wed, 25 Oct 2023 17:15:40 -0400 Subject: [PATCH] Fixed compression type for backup. #2278 --- bazarr/utilities/backup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bazarr/utilities/backup.py b/bazarr/utilities/backup.py index 95c2234dc..314200a02 100644 --- a/bazarr/utilities/backup.py +++ b/bazarr/utilities/backup.py @@ -7,7 +7,7 @@ import shutil import logging from datetime import datetime, timedelta -from zipfile import ZipFile, BadZipFile +from zipfile import ZipFile, BadZipFile, ZIP_DEFLATED from glob import glob from app.get_args import args @@ -74,7 +74,8 @@ def backup_to_zip(): config_file = os.path.join(args.config_dir, 'config', 'config.yaml') logging.debug(f'Config file path to backup is: {config_file}') - with ZipFile(os.path.join(get_backup_path(), backup_filename), 'w', compression=ZIP_DEFLATED, compresslevel=9) as backupZip: + with ZipFile(os.path.join(get_backup_path(), backup_filename), 'w', compression=ZIP_DEFLATED, + compresslevel=9) as backupZip: if database_backup_file: backupZip.write(database_backup_file, 'bazarr.db') try: