From f412b0e37f182ffff9cccb0d988a037804215a22 Mon Sep 17 00:00:00 2001 From: varyg <88599103+varyg1001@users.noreply.github.com> Date: Tue, 14 Feb 2023 21:56:55 +0100 Subject: [PATCH] Check if cookies exists --- devine/commands/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/devine/commands/auth.py b/devine/commands/auth.py index aa49b40..c4dd9b0 100644 --- a/devine/commands/auth.py +++ b/devine/commands/auth.py @@ -212,6 +212,9 @@ def add(ctx: click.Context, profile: str, service: str, cookie: Optional[str] = if cookie: cookie = Path(cookie) + if not cookie.is_file(): + log.error(f"No such file or directory: {cookie}.") + sys.exit(1) else: print("Opening File Dialogue, select a Cookie file to import.") cookie = tkinter.filedialog.askopenfilename(