refactor: remove config dependency from SSHHandler initialization
This commit is contained in:
parent
6a8c514817
commit
e4fe5c7036
@ -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."""
|
||||
|
@ -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."""
|
||||
|
Loading…
Reference in New Issue
Block a user