mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat: remove empty lines from ssh_keys text area, and show helpful message
Signed-off-by: Leonidas Spyropoulos <artafinde@archlinux.org>
This commit is contained in:
parent
7e06823e58
commit
48e5dc6763
4 changed files with 38 additions and 4 deletions
|
@ -192,7 +192,7 @@ def parse_ssh_key(string: str) -> Tuple[str, str]:
|
|||
|
||||
def parse_ssh_keys(string: str) -> list[Tuple[str, str]]:
|
||||
"""Parse a list of SSH public keys."""
|
||||
return [parse_ssh_key(e) for e in string.splitlines()]
|
||||
return [parse_ssh_key(e) for e in string.strip().splitlines(True) if e.strip()]
|
||||
|
||||
|
||||
def shell_exec(cmdline: str, cwd: str) -> Tuple[int, str, str]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue