From ca00892fb5a50b0fc2aef84453ec94cd375dbf38 Mon Sep 17 00:00:00 2001 From: William P Date: Wed, 20 Mar 2024 10:16:16 -0400 Subject: [PATCH] return an empty list upon exception --- app/AnimalShelter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/AnimalShelter.py b/app/AnimalShelter.py index 8cd72f0..9504aea 100644 --- a/app/AnimalShelter.py +++ b/app/AnimalShelter.py @@ -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): """ @@ -116,4 +116,4 @@ class AnimalShelter(object): return True # Operation was successful, so return true except Exception as e: print(f'Exception: {e}') # Exception handling - return False # Failed operation, so return false \ No newline at end of file + return False # Failed operation, so return false