Skip to content

Commit 97cf4d5

Browse files
shsmscamille-bouvy-frequenz
authored andcommitted
Check if stub is available before trying to fetch it
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent d2fad7b commit 97cf4d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frequenz/client/electricity_trading/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def stub(self) -> ElectricityTradingServiceAsyncStub:
177177
Raises:
178178
ClientNotConnected: If the client is not connected to the server.
179179
"""
180-
if self._channel is None:
180+
if self._stub is None:
181181
raise ClientNotConnected(server_url=self.server_url, operation="stub")
182182
return self._stub
183183

0 commit comments

Comments
 (0)