strip whitespace from Ergo hashed password output (#198)

Removes the need for some special-casing in `ergo genpasswd`
This commit is contained in:
Shivaram Lingamneni 2023-04-18 23:52:21 -07:00 committed by GitHub
parent 6edf4e27f1
commit 3b7f81e22c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,7 +126,7 @@ def hash_password(password: Union[str, bytes]) -> str:
["ergo", "genpasswd"], stdin=subprocess.PIPE, stdout=subprocess.PIPE
)
out, _ = p.communicate(input_)
return out.decode("utf-8")
return out.decode("utf-8").strip()
class ErgoController(BaseServerController, DirectoryBasedController):