From d97cc4094e0768989d57394de120b718a009bb13 Mon Sep 17 00:00:00 2001 From: Abhijeet Saroha Date: Mon, 4 Nov 2024 20:16:06 +0530 Subject: [PATCH] change key name --- src/makim/core.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/makim/core.py b/src/makim/core.py index 16fedb8..6c0eb88 100644 --- a/src/makim/core.py +++ b/src/makim/core.py @@ -239,7 +239,7 @@ def _render_host_config( """Render the host configuration values using Jinja2 templates.""" rendered: Dict[str, Any] = {} - for key in ('username', 'host', 'password', 'port'): + for key in ('user', 'host', 'password', 'port'): value = host_config.get(key, '') if value is None and key == 'password': @@ -257,13 +257,9 @@ def _render_host_config( else: rendered[key] = str_value - # Ensure all required fields are present - if 'port' not in rendered: - rendered['port'] = 22 - # Cast to HostConfig to ensure type safety return HostConfig( - username=rendered['username'], + username=rendered['user'], host=rendered['host'], port=rendered['port'], password=rendered.get('password'),