Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def main():
"""Run."""
async with ClientSession() as session:
try:
# Create a client:
client = await async_login("", "", session=session)
print("Showing active Tiles:")
print(await client.tiles.all())
print("Showing all Tiles:")
print(await client.tiles.all(show_inactive=True))
except TileError as err:
print(err)
async def async_init(self):
"""Further initialize connection to the Tile servers."""
try:
await self._client.async_init()
except TileError as err:
_LOGGER.error("Unable to set up Tile scanner: %s", err)
return False
await self._async_update()
async_track_time_interval(self._hass, self._async_update, DEFAULT_SCAN_INTERVAL)
return True
"""Define package errors."""
class TileError(Exception):
"""Define a base error."""
pass
class RequestError(TileError):
"""Define an error related to invalid requests."""
pass
class SessionExpiredError(TileError):
"""Define an error for when a Tile app session expires."""
pass
"""Define package errors."""
class TileError(Exception):
"""Define a base error."""
pass
class RequestError(TileError):
"""Define an error related to invalid requests."""
pass
class SessionExpiredError(TileError):
"""Define an error for when a Tile app session expires."""
pass