Skip to content

Commit

Permalink
Merge branch 'master' into todo_entity
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerSelwyn committed Oct 31, 2023
2 parents 782b75d + 3da9de8 commit 30f804a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions custom_components/o365/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"""Main initialisation code."""
import copy
import functools as ft
import json
import logging
import os
import shutil

import yaml
from homeassistant.const import CONF_ENABLED
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
from oauthlib.oauth2.rfc6749.errors import InvalidClientError

from O365 import Account, FileSystemTokenBackend
from oauthlib.oauth2.rfc6749.errors import InvalidClientError

from .classes.permissions import Permissions
from .const import (
Expand Down Expand Up @@ -151,7 +151,15 @@ async def _async_setup_account(hass, account_conf, conf_type):
main_resource=main_resource,
)
)
is_authenticated = account.is_authenticated
try:
is_authenticated = account.is_authenticated
except json.decoder.JSONDecodeError as err:
_LOGGER.warning(
"Token corrupt for account - please delete and re-authenticate: %s. Error - %s",
account_name,
err,
)
return

permissions, failed_permissions = perms.validate_permissions()
check_token = None
Expand Down
2 changes: 1 addition & 1 deletion custom_components/o365/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"O365==2.0.28",
"BeautifulSoup4>=4.10.0"
],
"version": "v4.4.3b1"
"version": "v4.4.3b2"
}

0 comments on commit 30f804a

Please sign in to comment.