Skip to content

Commit

Permalink
fixup! Raise the new exceptions in the client
Browse files Browse the repository at this point in the history
  • Loading branch information
llucax committed May 29, 2024
1 parent 4d9695a commit f10013e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/frequenz/client/microgrid/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def components(self) -> Iterable[Component]:
Raises:
ClientError: If the are any errors communicating with the Microgrid API,
most likely
a [GrpcStatusError][frequenz.client.microgrid.GrpcStatusError].
a [GrpcStatusError][frequenz.client.microgrid.GrpcStatusError] subclass.
"""
try:
component_list = await self.api.list_components(
Expand Down Expand Up @@ -172,7 +172,7 @@ async def connections(
Raises:
ClientError: If the are any errors communicating with the Microgrid API,
most likely
a [GrpcStatusError][frequenz.client.microgrid.GrpcStatusError].
a [GrpcStatusError][frequenz.client.microgrid.GrpcStatusError] subclass.
"""
connection_filter = pb_microgrid.ConnectionFilter(
starts=list(starts), ends=list(ends)
Expand Down Expand Up @@ -391,7 +391,7 @@ async def set_power(self, component_id: int, power_w: float) -> None:
Raises:
ClientError: If the are any errors communicating with the Microgrid API,
most likely
a [GrpcStatusError][frequenz.client.microgrid.GrpcStatusError].
a [GrpcStatusError][frequenz.client.microgrid.GrpcStatusError] subclass.
"""
try:
await self.api.set_power_active(
Expand Down Expand Up @@ -425,7 +425,7 @@ async def set_bounds(
greater than 0.
ClientError: If the are any errors communicating with the Microgrid API,
most likely
a [GrpcStatusError][frequenz.client.microgrid.GrpcStatusError].
a [GrpcStatusError][frequenz.client.microgrid.GrpcStatusError] subclass.
"""
if upper < 0:
raise ValueError(f"Upper bound {upper} must be greater than or equal to 0.")
Expand Down

0 comments on commit f10013e

Please sign in to comment.