From 2b7d813e0610d8b3c158da11fc8e20338846e2e2 Mon Sep 17 00:00:00 2001 From: Fede Calendino Date: Mon, 20 Feb 2023 11:16:13 +0100 Subject: [PATCH] Minor bug fix --- info.plist | 2 +- pyproject.toml | 2 +- src/utils.py | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/info.plist b/info.plist index be63568..00a13c1 100644 --- a/info.plist +++ b/info.plist @@ -434,7 +434,7 @@ version - 0.2.0 + 0.2.1 webaddress https://github.com/fedecalendino/alfred-minute-inbox diff --git a/pyproject.toml b/pyproject.toml index 8ae4d94..63b93a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "Minute Inbox" -version = "0.2.0" +version = "0.2.1" description = "Get a disposable 10 minute email address" documentation = "https://github.com/fedecalendino/alfred-minute-inbox/blob/main/README.md" homepage = "https://github.com/fedecalendino/alfred-minute-inbox" diff --git a/src/utils.py b/src/utils.py index 67719f6..c19fc31 100644 --- a/src/utils.py +++ b/src/utils.py @@ -21,9 +21,12 @@ def restore_cached_inbox(workflow): token=token, ) - _ = inbox.expires_in - - return inbox + try: + _ = inbox.expires_in + return inbox + except ValueError as exc: + delete_cached_inbox(workflow) + raise exc def delete_cached_inbox(workflow):