refactor: use pathlib instead of os.path

This commit is contained in:
RedDeadDepresso
2024-09-25 00:00:07 +01:00
parent 8d3af9996b
commit 8ec39fe30d
8 changed files with 206 additions and 224 deletions

View File

@@ -1,11 +1,9 @@
import os
class CreateBackup:
def __init__(self, config, file_manager):
"""Initializes the Bounty module.
"""Initializes the CreateBackup module.
Args:
config (Config): BAAuto Config instance
config (Config): KKAFIO Config instance
"""
self.config = config
self.file_manager = file_manager
@@ -15,8 +13,8 @@ class CreateBackup:
self.filename = self.config.create_backup["Filename"]
self.output_path = self.config.create_backup["OutputPath"]
def logic_wrapper(self):
output_path = os.path.join(self.output_path, self.filename)
def run(self):
output_path = self.output_path / self.filename
self.file_manager.create_archive(self.folders, output_path)