Merge pull request #30 from varyg1001/master

Check if cookies exists
This commit is contained in:
rlaphoenix 2023-02-14 22:38:24 +00:00 committed by GitHub
commit 88a5bc8ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -212,6 +212,9 @@ def add(ctx: click.Context, profile: str, service: str, cookie: Optional[str] =
if cookie: if cookie:
cookie = Path(cookie) cookie = Path(cookie)
if not cookie.is_file():
log.error(f"No such file or directory: {cookie}.")
sys.exit(1)
else: else:
print("Opening File Dialogue, select a Cookie file to import.") print("Opening File Dialogue, select a Cookie file to import.")
cookie = tkinter.filedialog.askopenfilename( cookie = tkinter.filedialog.askopenfilename(