Skip to content

Commit

Permalink
Merge pull request #85 from MozillaSecurity/fix-type
Browse files Browse the repository at this point in the history
Fix log_prefix type to be optional
  • Loading branch information
pyoor authored Jan 31, 2022
2 parents 341426b + 8cd72db commit f440393
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lithium/interestingness/timed_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_signal_name(signum: int, default: str = "Unknown signal") -> str:
def timed_run(
cmd_with_args: List[str],
timeout: int,
log_prefix: str = "",
log_prefix: Optional[str] = None,
env: Optional[Dict[str, str]] = None,
inp: str = "",
preexec_fn: Optional[Callable[[], None]] = None,
Expand Down Expand Up @@ -141,7 +141,7 @@ def timed_run(
print(" %s" % exc)
sys.exit(2)
finally:
if log_prefix is not None:
if isinstance(child_stderr, BinaryIO) and isinstance(child_stdout, BinaryIO):
child_stdout.close()
child_stderr.close()
elapsed_time = time.time() - start_time
Expand Down

0 comments on commit f440393

Please sign in to comment.