mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2024-11-15 17:40:57 +00:00
should an incorrect kind be passed to entry point, raise XAirRemoteError
remove the print statement patch bump
This commit is contained in:
parent
764195a452
commit
d27824d1cf
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "xair-api"
|
name = "xair-api"
|
||||||
version = "2.2.5"
|
version = "2.2.6"
|
||||||
description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
|
description = "Remote control Behringer X-Air | Midas MR mixers through OSC"
|
||||||
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
authors = ["onyx-and-iris <code@onyxandiris.online>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -80,7 +80,7 @@ class XAirRemote(abc.ABC):
|
|||||||
raise XAirRemoteError(
|
raise XAirRemoteError(
|
||||||
"Failed to setup OSC connection to mixer. Please check for correct ip address."
|
"Failed to setup OSC connection to mixer. Please check for correct ip address."
|
||||||
)
|
)
|
||||||
print(
|
self.logger.info(
|
||||||
f"Successfully connected to {self.info_response[2]} at {self.info_response[0]}."
|
f"Successfully connected to {self.info_response[2]} at {self.info_response[0]}."
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -174,9 +174,10 @@ def request_remote_obj(kind_id: str, *args, **kwargs) -> XAirRemote:
|
|||||||
|
|
||||||
Returns a reference to an XAirRemote class of a kind
|
Returns a reference to an XAirRemote class of a kind
|
||||||
"""
|
"""
|
||||||
|
|
||||||
XAIRREMOTE_cls = None
|
XAIRREMOTE_cls = None
|
||||||
try:
|
try:
|
||||||
XAIRREMOTE_cls = _remotes[kind_id]
|
XAIRREMOTE_cls = _remotes[kind_id]
|
||||||
except ValueError as e:
|
except KeyError as e:
|
||||||
raise SystemExit(e)
|
raise XAirRemoteError(f"Unknown mixer kind '{kind_id}'") from e
|
||||||
return XAIRREMOTE_cls(*args, **kwargs)
|
return XAIRREMOTE_cls(*args, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user