mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 15:27:17 +00:00
do not skip empty lines
This commit is contained in:
parent
7432a94a06
commit
a9dae380ab
@ -117,8 +117,6 @@ def check_output(*args: str, exception: Exception | None = None, cwd: Path | Non
|
|||||||
result: list[str] = []
|
result: list[str] = []
|
||||||
for line in iter(get_io(process, "stdout").readline, ""):
|
for line in iter(get_io(process, "stdout").readline, ""):
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
if not line: # skip empty lines
|
|
||||||
continue
|
|
||||||
result.append(line)
|
result.append(line)
|
||||||
log(line)
|
log(line)
|
||||||
|
|
||||||
@ -133,7 +131,7 @@ def check_output(*args: str, exception: Exception | None = None, cwd: Path | Non
|
|||||||
raise exception
|
raise exception
|
||||||
raise subprocess.CalledProcessError(status_code, process.args)
|
raise subprocess.CalledProcessError(status_code, process.args)
|
||||||
|
|
||||||
return "\n".join(result)
|
return "\n".join(result).rstrip("\n") # remove newline at the end of any
|
||||||
|
|
||||||
|
|
||||||
def check_user(paths: RepositoryPaths, *, unsafe: bool) -> None:
|
def check_user(paths: RepositoryPaths, *, unsafe: bool) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user