This commit is contained in:
Maxim Devaev
2022-06-19 20:42:52 +03:00
parent 4aa7a21b55
commit 0edf854832
2 changed files with 6 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ import operator
import functools
import multiprocessing.queues
import queue
import shlex
from typing import Tuple
from typing import List
@@ -38,6 +39,10 @@ def remap(value: int, in_min: int, in_max: int, out_min: int, out_max: int) -> i
# =====
def cmdfmt(cmd: List[str]) -> str:
return " ".join(map(shlex.quote, cmd))
def efmt(err: Exception) -> str:
return f"{type(err).__name__}: {err}"