@@ -223,7 +223,7 @@ def support(client, jointID, enforcers, output):
223
223
path = "/v1/fed/cluster/{}{}" .format (jointID , path )
224
224
data = support_request (path , output )
225
225
entries = data .get ("hosts" )
226
- if len (entries ):
226
+ if entries and len (entries ):
227
227
ids = [entry ["id" ] for entry in entries ]
228
228
for _ , _path in enumerate (support_host [1 :]):
229
229
path = _path
@@ -238,7 +238,7 @@ def support(client, jointID, enforcers, output):
238
238
path = "/v1/fed/cluster/{}{}" .format (jointID , path )
239
239
data = support_request (path , output )
240
240
entries = data .get ("controllers" )
241
- if len (entries ):
241
+ if entries and len (entries ):
242
242
ids = [entry ["id" ] for entry in entries ]
243
243
for _ , _path in enumerate (support_controller [1 :]):
244
244
path = _path
@@ -253,7 +253,7 @@ def support(client, jointID, enforcers, output):
253
253
path = "/v1/fed/cluster/{}{}" .format (jointID , path )
254
254
data = support_request (path , output )
255
255
entries = data .get ("enforcers" )
256
- if enforcers and len (entries ) > 0 :
256
+ if enforcers and entries and len (entries ) > 0 :
257
257
all = [entry ["id" ] for entry in entries ]
258
258
ids = []
259
259
@@ -282,7 +282,7 @@ def support(client, jointID, enforcers, output):
282
282
path = "/v1/fed/cluster/{}{}" .format (jointID , path )
283
283
data = support_request (path , output )
284
284
entries = data .get ("workloads" )
285
- if len (entries ):
285
+ if entries and len (entries ):
286
286
ids = [entry ["brief" ]["id" ] for entry in entries ]
287
287
for _ , _path in enumerate (support_workload [1 :]):
288
288
path = _path
0 commit comments