fix: only include --password in auth_args if non-empty

This commit is contained in:
2026-06-24 11:56:08 +02:00
parent cf1b7e9994
commit f0b5761d0e
+5 -2
View File
@@ -33,9 +33,12 @@ class SVNConfig:
def auth_args(self) -> list:
"""Return ``['--username', u, '--password', p]`` if configured, else []."""
if self.username:
return ["--username", self.username, "--password", self.password or ""]
if not self.username:
return []
args = ["--username", self.username]
if self.password:
args += ["--password", self.password]
return args
@classmethod
def from_dict(cls, d: dict, prefix: str) -> "SVNConfig":