File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/frequenz/sdk/timeseries Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -203,16 +203,15 @@ def initialize(
203203 )
204204 case 1 :
205205 metadata = grid_connections [0 ].metadata
206- if metadata is not None and metadata .fuse is not None :
207- fuse = Fuse (max_current = Current .from_amperes (metadata .fuse .max_current ))
208-
209206 if metadata is None :
210207 _logger .warning (
211208 "Unable to get grid metadata, the grid connection point is "
212209 "considered to have no fuse"
213210 )
214- elif fuse is None :
211+ elif metadata . fuse is None :
215212 _logger .warning ("The grid connection point does not have a fuse" )
213+ else :
214+ fuse = Fuse (max_current = Current .from_amperes (metadata .fuse .max_current ))
216215 case _:
217216 raise RuntimeError (
218217 f"Expected at most one grid connection, got { grid_connections_count } "
You can’t perform that action at this time.
0 commit comments