refactor: remove config dependency from SSHHandler initialization

This commit is contained in:
KaySar12 2025-05-29 11:14:18 +07:00
parent 6a8c514817
commit e4fe5c7036
2 changed files with 4 additions and 4 deletions

View File

@ -3,12 +3,12 @@ import common.color_log as color_log
import shutil
import os
import shlex
from services.odoo.connection import OdooConnection
class SSHHandler:
def __init__(self, config_path="config/settings.yaml"):
self.config = OdooConnection(config_path)
def __init__(self):
pass
def _get_remote_command(self, instance, cmd):
"""Generate SSH command for remote execution."""

View File

@ -12,7 +12,7 @@ class GitHandler:
def __init__(self, config_path="config/settings.yaml"):
self.config = OdooConnection(config_path)
self.local_path = None # Will be set based on instance configuration
self.ssh_handler = SSHHandler(config_path)
self.ssh_handler = SSHHandler()
def _get_auth_url(self, repo_url, instance):
"""Add authentication to repository URL if credentials are provided."""