Update docstrings (#7374)
* Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstrings * Update docstring * Update docstrings * Update docstrings * Fix lint issues * Update docstrings * Revert changes in dict
This commit is contained in:
parent
0e08925259
commit
a4f1f6e724
340 changed files with 1533 additions and 1708 deletions
|
@ -24,7 +24,7 @@ def session_scope(*, hass=None, session=None):
|
|||
yield session
|
||||
session.commit()
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
_LOGGER.error('Error executing query: %s', err)
|
||||
_LOGGER.error("Error executing query: %s", err)
|
||||
session.rollback()
|
||||
raise
|
||||
finally:
|
||||
|
@ -43,7 +43,7 @@ def commit(session, work):
|
|||
session.commit()
|
||||
return True
|
||||
except sqlalchemy.exc.OperationalError as err:
|
||||
_LOGGER.error('Error executing query: %s', err)
|
||||
_LOGGER.error("Error executing query: %s", err)
|
||||
session.rollback()
|
||||
time.sleep(QUERY_RETRY_WAIT)
|
||||
return False
|
||||
|
@ -63,7 +63,7 @@ def execute(qry):
|
|||
(row.to_native() for row in qry)
|
||||
if row is not None]
|
||||
except SQLAlchemyError as err:
|
||||
_LOGGER.error('Error executing query: %s', err)
|
||||
_LOGGER.error("Error executing query: %s", err)
|
||||
|
||||
if tryno == RETRIES - 1:
|
||||
raise
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue