diff --git a/Pipfile b/Pipfile index 173d643..4661008 100644 --- a/Pipfile +++ b/Pipfile @@ -4,8 +4,7 @@ verify_ssl = true name = "pypi" [packages] -aiohttp = "*" -attrs = "==21.2.0" +aiohttp = "<4.0,>=3.8" [dev-packages] ipdb = "*" diff --git a/ideenergy/cli.py b/ideenergy/cli.py index fbfd2ca..2386e5c 100644 --- a/ideenergy/cli.py +++ b/ideenergy/cli.py @@ -92,14 +92,14 @@ async def _main(): ) try: - data = await _main() + if data := await _main(): + print(pprint.pformat(data)) except RequestFailedError as e: print(f"Request failed: {e}", file=sys.stderr) await session.close() - return + sys.ext(1) - print(pprint.pformat(data)) await session.close() diff --git a/setup.cfg b/setup.cfg index aabd334..ead40c6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ [metadata] name = ideenergy -version = 1.0.0-rc1 +version = 1.0.0-rc2 author = Luis López author_email = luis@cuarentaydos.com description = Interface to i-de.es energy data @@ -22,11 +22,10 @@ package_dir = packages = find: python_requires = >=3.9 install_requires = - aiohttp - attrs == 21.2.0 + aiohttp>=3.8.0, <4 [options.extras_require] -mqtt = paho-mqtt >= 1.6.1 +mqtt = paho-mqtt >= 1.6.1, <2 [options.packages.find] where =