Merge pull request 'return an empty list upon exception' (#1) from empty-list into master
Reviewed-on: #1
This commit is contained in:
@@ -77,7 +77,7 @@ class AnimalShelter(object):
|
|||||||
return dataList # Return the list
|
return dataList # Return the list
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'Exception: {e}') # Exception handling
|
print(f'Exception: {e}') # Exception handling
|
||||||
return False # Failed operation, so return false
|
return [] # Return empty list
|
||||||
# Update
|
# Update
|
||||||
def update(self, **kwargs):
|
def update(self, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user