diff --git a/pyproject.toml b/pyproject.toml index e5d688d0..bea30920 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "roc-validator" -version = "0.4.4" +version = "0.4.5" description = "A Python package to validate RO-Crates" authors = [ "Marco Enrico Piras ", diff --git a/rocrate_validator/cli/commands/validate.py b/rocrate_validator/cli/commands/validate.py index 365d1a73..bb3505bf 100644 --- a/rocrate_validator/cli/commands/validate.py +++ b/rocrate_validator/cli/commands/validate.py @@ -109,6 +109,8 @@ def __get_single_char_unix__(console: Optional[Console] = None, end: str = "\n", try: tty.setraw(sys.stdin.fileno()) char = sys.stdin.read(1) + if char == "\x03": + raise KeyboardInterrupt finally: termios.tcsetattr(fd, termios.TCSADRAIN, old_settings) if console: diff --git a/rocrate_validator/cli/utils.py b/rocrate_validator/cli/utils.py index 5ad48c7c..e973aba1 100644 --- a/rocrate_validator/cli/utils.py +++ b/rocrate_validator/cli/utils.py @@ -58,7 +58,7 @@ class SystemPager(Pager): """Uses the pager installed on the system.""" def _pager(self, content: str) -> Any: - return pydoc.pipepager(content, "less -R") + return pydoc.pipepager(content, "less -R -K") def show(self, content: str) -> None: """Use the same pager used by pydoc."""