return an empty list upon exception

This commit is contained in:
2024-03-20 10:16:16 -04:00
parent 1b1ded5f36
commit ca00892fb5

View File

@@ -77,7 +77,7 @@ class AnimalShelter(object):
return dataList # Return the list
except Exception as e:
print(f'Exception: {e}') # Exception handling
return False # Failed operation, so return false
return [] # Return empty list
# Update
def update(self, **kwargs):
"""