diff --git a/aiopegelonline/__init__.py b/aiopegelonline/__init__.py index 0f7881f..d3bb4c5 100644 --- a/aiopegelonline/__init__.py +++ b/aiopegelonline/__init__.py @@ -6,7 +6,7 @@ from aiohttp.client import ClientSession -from .const import BASE_URL, CONNECT_ERRORS, LOGGER, REQUEST_TIMEOUT +from .const import BASE_URL, CONNECT_ERRORS, LOGGER from .exceptions import PegelonlineDataError from .models import Station, StationMeasurements @@ -22,9 +22,7 @@ async def _async_do_request(self, url: str, params: dict): """Perform an async request.""" LOGGER.debug("REQUEST url: %s params: %s", url, params) try: - async with self.session.get( - url, params=params, timeout=REQUEST_TIMEOUT - ) as resp: + async with self.session.get(url, params=params) as resp: result = await resp.text() LOGGER.debug("RESPONSE status: %s text: %s", resp.status, result) result = json.loads(result) diff --git a/aiopegelonline/const.py b/aiopegelonline/const.py index 0bd96b0..851f1c4 100644 --- a/aiopegelonline/const.py +++ b/aiopegelonline/const.py @@ -8,8 +8,6 @@ BASE_URL = "https://www.pegelonline.wsv.de/webservices/rest-api/v2" -REQUEST_TIMEOUT = 10 - CONNECT_ERRORS = ( aiohttp.ClientError, asyncio.TimeoutError, diff --git a/setup.py b/setup.py index be7e0da..f111a81 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ """Setup module for aiopegelonline.""" from pathlib import Path -from setuptools import find_packages, setup +from setuptools import setup PROJECT_DIR = Path(__file__).parent.resolve() README_FILE = PROJECT_DIR / "README.md"