diff --git a/PFERD/__main__.py b/PFERD/__main__.py index c03e08c..69feb81 100644 --- a/PFERD/__main__.py +++ b/PFERD/__main__.py @@ -266,4 +266,8 @@ def main() -> None: exit() pferd = Pferd(config) - asyncio.run(pferd.run()) + try: + asyncio.run(pferd.run()) + except KeyboardInterrupt: + # TODO Clean up tmp files + pass diff --git a/PFERD/crawler.py b/PFERD/crawler.py index 2f8e5ad..2785e41 100644 --- a/PFERD/crawler.py +++ b/PFERD/crawler.py @@ -49,6 +49,7 @@ def noncritical(f: Wrapped) -> Wrapped: log.print(f"[bold bright_red]Warning[/] {escape(str(e))}") crawler.error_free = False except CrawlError as e: + # TODO Don't print error, just pass it on upwards log.print(f"[bold bright_red]Error[/] [red]{escape(str(e))}") crawler.error_free = False raise