realm.py: adds gaurd to test if we're getting a no items

This commit is contained in:
Jed Reynolds
2020-08-06 22:43:55 -07:00
parent a7eb40abfd
commit 063c15e6a9

View File

@@ -547,7 +547,9 @@ class Realm(LFCliBase):
def remove_all_endps(self): def remove_all_endps(self):
endp_list = self.json_get("/endp/list") endp_list = self.json_get("/endp/list")
if endp_list is not None: if "items" in endp_list:
return
if endp_list is not None or endp_list :
print("Removing all endps") print("Removing all endps")
endp_list = list(endp_list['endpoint']) endp_list = list(endp_list['endpoint'])
for endp_name in range(len(endp_list)): for endp_name in range(len(endp_list)):