Skip to content

Commit

Permalink
Merge pull request #34 from 2Fake/development
Browse files Browse the repository at this point in the history
v0.5.1
  • Loading branch information
Shutgun committed Jan 19, 2021
2 parents deb7de0 + 0d59847 commit 9d875d1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Coveralls
run: |
python -m pip install --upgrade pip
pip install wheel coveralls==1.10.0
pip install wheel coveralls
export COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_TOKEN }}
coveralls
- name: Clean up coverage
Expand Down
2 changes: 1 addition & 1 deletion devolo_plc_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.0"
__version__ = "0.5.1"
6 changes: 3 additions & 3 deletions devolo_plc_api/clients/protobuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Callable

from google.protobuf.json_format import MessageToDict
from httpx import AsyncClient, ConnectTimeout, DigestAuth, Response
from httpx import AsyncClient, ConnectError, ConnectTimeout, DigestAuth, ReadTimeout, Response

from ..exceptions.device import DevicePasswordProtected, DeviceUnavailable

Expand Down Expand Up @@ -54,7 +54,7 @@ async def _async_get(self, sub_url: str, timeout: float = TIMEOUT) -> Response:
return await self._session.get(url, auth=DigestAuth(self._user, self.password), timeout=timeout)
except TypeError:
raise DevicePasswordProtected("The used password is wrong.") from None
except ConnectTimeout:
except (ConnectTimeout, ConnectError, ReadTimeout):
raise DeviceUnavailable("The device is currenctly not available. Maybe on standby?") from None

async def _async_post(self, sub_url: str, content: bytes, timeout: float = TIMEOUT) -> Response:
Expand All @@ -65,7 +65,7 @@ async def _async_post(self, sub_url: str, content: bytes, timeout: float = TIMEO
return await self._session.post(url, auth=DigestAuth(self._user, self.password), content=content, timeout=timeout)
except TypeError:
raise DevicePasswordProtected("The used password is wrong.") from None
except ConnectTimeout:
except (ConnectTimeout, ConnectError, ReadTimeout):
raise DeviceUnavailable("The device is currenctly not available. Maybe on standby?") from None

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion devolo_plc_api/plcnet_api/plcnetapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def async_identify_device_stop(self) -> bool:
response.FromString(await query.aread()) # pylint: disable=no-member
return bool(not response.result) # pylint: disable=no-member

async def async_set_user_device_name(self, name):
async def async_set_user_device_name(self, name) -> bool:
"""
Set device name.
Expand Down
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.5.1] - 2021/12/19

### Fixed

- React correctly on different connection errors
## [v0.5.0] - 2020/12/21

### Changed
Expand Down

0 comments on commit 9d875d1

Please sign in to comment.