From cf695bf9a43bbc85770e8ded65881dd29bb627e6 Mon Sep 17 00:00:00 2001 From: rwxd Date: Thu, 23 Feb 2023 23:55:20 +0100 Subject: [PATCH] fix: print when error happened and continue --- wallabag2readwise/cli.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wallabag2readwise/cli.py b/wallabag2readwise/cli.py index 9e55b40..943c0de 100644 --- a/wallabag2readwise/cli.py +++ b/wallabag2readwise/cli.py @@ -88,9 +88,12 @@ def reader( for entry in wallabag_entries: console.print(f'=> Importing {entry.title}') location = 'archive' if entry.archived else 'new' - readwise.create( - entry.url, tags=[t.label for t in entry.tags], location=location - ) + try: + readwise.create( + entry.url, tags=[t.label for t in entry.tags], location=location + ) + except Exception as e: + console.print(f'==> Error: {e}') @app.command()