From 2faa4b747b531a8f2969fb7080431a4a057ceb44 Mon Sep 17 00:00:00 2001 From: Joakim Holm Date: Wed, 31 May 2023 19:41:47 +0200 Subject: [PATCH] Make sure error happens if no cookie file is found --- grawlix/__main__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grawlix/__main__.py b/grawlix/__main__.py index 687e399..c30ee35 100644 --- a/grawlix/__main__.py +++ b/grawlix/__main__.py @@ -80,6 +80,8 @@ async def authenticate(source: Source, config: Config, options): cookie_file = get_cookie_file(options) if cookie_file: source.load_cookies(cookie_file) + else: + raise SourceNotAuthenticated else: raise SourceNotAuthenticated @@ -108,6 +110,7 @@ async def main() -> None: logging.info("") except GrawlixError as error: error.print_error() + exit(1) async def download_with_progress(book: Book, progress: Progress, template: str):