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):