From 98b8ca31faafbc5b27aa6eaa397a6610c2c43f31 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 22 May 2021 14:45:32 +0200 Subject: [PATCH] Add some todos --- PFERD/__main__.py | 6 +++++- PFERD/crawler.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) 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