fix: only include --password in auth_args if non-empty
This commit is contained in:
@@ -33,9 +33,12 @@ class SVNConfig:
|
|||||||
|
|
||||||
def auth_args(self) -> list:
|
def auth_args(self) -> list:
|
||||||
"""Return ``['--username', u, '--password', p]`` if configured, else []."""
|
"""Return ``['--username', u, '--password', p]`` if configured, else []."""
|
||||||
if self.username:
|
if not self.username:
|
||||||
return ["--username", self.username, "--password", self.password or ""]
|
|
||||||
return []
|
return []
|
||||||
|
args = ["--username", self.username]
|
||||||
|
if self.password:
|
||||||
|
args += ["--password", self.password]
|
||||||
|
return args
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls, d: dict, prefix: str) -> "SVNConfig":
|
def from_dict(cls, d: dict, prefix: str) -> "SVNConfig":
|
||||||
|
|||||||
Reference in New Issue
Block a user