python-opendata-transport 0.1.3__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/PKG-INFO +1 -1
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/opendata_transport/__init__.py +6 -2
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/PKG-INFO +1 -1
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/setup.py +1 -1
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/LICENSE +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/MANIFEST.in +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/README.rst +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/opendata_transport/exceptions.py +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/SOURCES.txt +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/dependency_links.txt +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/requires.txt +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/top_level.txt +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/python_opendata_transport.egg-info/zip-safe +0 -0
- {python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/setup.cfg +0 -0
{python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/opendata_transport/__init__.py
RENAMED
|
@@ -33,15 +33,19 @@ class OpendataTransport(object):
|
|
|
33
33
|
|
|
34
34
|
try:
|
|
35
35
|
with async_timeout.timeout(5, loop=self._loop):
|
|
36
|
-
response = await self._session.get(url)
|
|
36
|
+
response = await self._session.get(url, raise_for_status=True)
|
|
37
37
|
|
|
38
38
|
_LOGGER.debug(
|
|
39
39
|
"Response from transport.opendata.ch: %s", response.status)
|
|
40
40
|
data = await response.json()
|
|
41
41
|
_LOGGER.debug(data)
|
|
42
|
-
except (asyncio.TimeoutError
|
|
42
|
+
except (asyncio.TimeoutError):
|
|
43
43
|
_LOGGER.error("Can not load data from transport.opendata.ch")
|
|
44
44
|
raise exceptions.OpendataTransportConnectionError()
|
|
45
|
+
except (aiohttp.ClientError) as aiohttpClientError:
|
|
46
|
+
_LOGGER.error("Response from transport.opendata.ch: %s",
|
|
47
|
+
aiohttpClientError)
|
|
48
|
+
raise exceptions.OpendataTransportConnectionError()
|
|
45
49
|
|
|
46
50
|
try:
|
|
47
51
|
self.from_id = data['from']['id']
|
|
@@ -21,7 +21,7 @@ if sys.argv[-1] == 'publish':
|
|
|
21
21
|
|
|
22
22
|
setup(
|
|
23
23
|
name='python_opendata_transport',
|
|
24
|
-
version='0.1.
|
|
24
|
+
version='0.1.4',
|
|
25
25
|
description='Python API for interacting with transport.opendata.ch.',
|
|
26
26
|
long_description=long_description,
|
|
27
27
|
url='https://github.com/fabaff/python-opendata-transport',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_opendata_transport-0.1.3 → python_opendata_transport-0.1.4}/opendata_transport/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|