X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=exec_utils.py;h=1b587405fb1a706a1d7b1c128fde2ad878401137;hb=c79ecbf708a63a54a9c3e8d189b65d4794930082;hp=c669f5460b2d97490d308c38b285233f431a9ffa;hpb=ea5adca079e66204e59befdf6bf373a3b5baf7af;p=python_utils.git diff --git a/exec_utils.py b/exec_utils.py index c669f54..1b58740 100644 --- a/exec_utils.py +++ b/exec_utils.py @@ -2,10 +2,10 @@ import shlex import subprocess -from typing import List +from typing import List, Optional -def cmd_with_timeout(command: str, timeout_seconds: float) -> int: +def cmd_with_timeout(command: str, timeout_seconds: Optional[float]) -> int: return subprocess.check_call( ["/bin/bash", "-c", command], timeout=timeout_seconds )