diff --git a/src/comby/binary.py b/src/comby/binary.py index 6147058..43aab20 100644 --- a/src/comby/binary.py +++ b/src/comby/binary.py @@ -37,6 +37,7 @@ class CombyBinary(CombyInterface): """ location = attr.ib(type=str, default='comby') language = attr.ib(type=str, default='.c') + timeout: Optional[int] = 60 @property def version(self) -> str: @@ -68,6 +69,9 @@ def call(self, args: str, text: Optional[str] = None) -> str: input_ = text.encode('utf8') logger.debug(f'supplying input text: {text}') + if self.timeout is not None: + args += f' -timeout {self.timeout}' + cmd_s = f'{self.location} {args}' p = subprocess.run(cmd_s, shell=True,