more tweaking

This commit is contained in:
Greg Gauthier 2024-07-17 22:59:13 +01:00
parent b2b3e77a34
commit 11338ebf7c
2 changed files with 2 additions and 8 deletions

View File

@ -6,7 +6,7 @@ from utils.misc_utils import immutable_to_list
if __name__ == '__main__':
db = pseudodb.PseudoDB('pseudodb.default.data')
data_collections = db.data_collections()
data_collections = db.get_collections()
print("Collections in Pseudodb: "+str(data_collections))
for collection in data_collections:
print("Collection: "+collection)

View File

@ -15,7 +15,7 @@ class PseudoDB:
print(f"Data module '{module_name}' not found.")
return None
def data_collections(self):
def get_collections(self):
# Check if default has been successfully loaded
if self.data is not None:
attr_names = []
@ -26,12 +26,6 @@ class PseudoDB:
else:
return []
def collections(self, attr_name):
if self.data is not None:
return getattr(self.data, attr_name)
else:
return None
def get_keys(self, attr_name):
if self.data is not None:
collection = getattr(self.data, attr_name)