config : fallback to 22 instead of None

The configparser fallback option was None set it to use 22 instead as
None doesn't make sense
This commit is contained in:
2026-01-01 17:30:28 +01:00
parent 27924013d9
commit 5af5374f77

View File

@@ -16,7 +16,7 @@ class ServerConfig:
sshargs: str = ""
hostname: str = ""
ip: str = ""
port: int | None = 22
port: int = 22
def __post_init__(self):
"""
@@ -85,7 +85,7 @@ def load_config(config_path:str) -> Config:
config.get(server_section, "sshargs", fallback=""),
config.get(server_section, "hostname", fallback=""),
config.get(server_section, "ip", fallback=""),
config.getint(server_section, "port", fallback=None)
config.getint(server_section, "port", fallback=22)
)
roots_config = RootsConfig(
config.get(roots_section, "local"),