Skip to content

Commit

Permalink
change key name
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetSaroha committed Nov 4, 2024
1 parent 3d383f7 commit d97cc40
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/makim/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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'),
Expand Down

0 comments on commit d97cc40

Please sign in to comment.