From d9ff7fede2fb1ec8aaefe2b9cb78ce25963a683b Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 8 Apr 2016 06:58:07 -0400 Subject: [PATCH] 9358: get_table_metadata(nav_type) anomaly --- gramps/gen/db/generic.py | 6 +++--- gramps/gen/proxy/filter.py | 4 ++-- gramps/gen/proxy/living.py | 4 ++-- gramps/gen/proxy/private.py | 4 ++-- gramps/gen/proxy/proxybase.py | 4 ++-- gramps/gen/proxy/referencedbyselection.py | 4 ++-- gramps/plugins/database/bsddb_support/read.py | 6 +++--- gramps/plugins/database/bsddb_support/write.py | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gramps/gen/db/generic.py b/gramps/gen/db/generic.py index 165ed8389..0fde80385 100644 --- a/gramps/gen/db/generic.py +++ b/gramps/gen/db/generic.py @@ -727,9 +727,9 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback): Private implementation of get_table_func. """ if table is None: - return self.__tables.keys() + return list(self.__tables.keys()) elif func is None: - return self.__tables[table] # dict of functions + return list(self.__tables[table].keys()) elif func in self.__tables[table].keys(): return self.__tables[table][func] else: @@ -811,7 +811,7 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback): def get_table_names(self): """Return a list of valid table names.""" - return list(self.get_table_func()) + return self.get_table_func() def get_table_metadata(self, table_name): """Return the metadata for a valid table name.""" diff --git a/gramps/gen/proxy/filter.py b/gramps/gen/proxy/filter.py index f62f24fdc..a64465983 100644 --- a/gramps/gen/proxy/filter.py +++ b/gramps/gen/proxy/filter.py @@ -181,9 +181,9 @@ class FilterProxyDb(ProxyDbBase): Private implementation of get_table_func. """ if table is None: - return self.__tables.keys() + return list(self.__tables.keys()) elif func is None: - return self.__tables[table].keys() + return list(self.__tables[table].keys()) elif func in self.__tables[table].keys(): return self.__tables[table][func] else: diff --git a/gramps/gen/proxy/living.py b/gramps/gen/proxy/living.py index be91aa2f0..a36413728 100644 --- a/gramps/gen/proxy/living.py +++ b/gramps/gen/proxy/living.py @@ -194,9 +194,9 @@ class LivingProxyDb(ProxyDbBase): Private implementation of get_table_func. """ if table is None: - return self.__tables.keys() + return list(self.__tables.keys()) elif func is None: - return self.__tables[table].keys() + return list(self.__tables[table].keys()) elif func in self.__tables[table].keys(): return self.__tables[table][func] else: diff --git a/gramps/gen/proxy/private.py b/gramps/gen/proxy/private.py index a64b66998..b1bc8dc23 100644 --- a/gramps/gen/proxy/private.py +++ b/gramps/gen/proxy/private.py @@ -164,9 +164,9 @@ class PrivateProxyDb(ProxyDbBase): Private implementation of get_table_func. """ if table is None: - return self.__tables.keys() + return list(self.__tables.keys()) elif func is None: - return self.__tables[table].keys() + return list(self.__tables[table].keys()) elif func in self.__tables[table].keys(): return self.__tables[table][func] else: diff --git a/gramps/gen/proxy/proxybase.py b/gramps/gen/proxy/proxybase.py index 9e060ddd2..2861bfaa6 100644 --- a/gramps/gen/proxy/proxybase.py +++ b/gramps/gen/proxy/proxybase.py @@ -232,9 +232,9 @@ class ProxyDbBase(DbReadBase): Private implementation of get_table_func. """ if table is None: - return self.__tables.keys() + return list(self.__tables.keys()) elif func is None: - return self.__tables[table].keys() + return list(self.__tables[table].keys()) elif func in self.__tables[table].keys(): return self.__tables[table][func] else: diff --git a/gramps/gen/proxy/referencedbyselection.py b/gramps/gen/proxy/referencedbyselection.py index 95ab46bae..a04c9e7a6 100644 --- a/gramps/gen/proxy/referencedbyselection.py +++ b/gramps/gen/proxy/referencedbyselection.py @@ -193,9 +193,9 @@ class ReferencedBySelectionProxyDb(ProxyDbBase): Private implementation of get_table_func. """ if table is None: - return self.__tables.keys() + return list(self.__tables.keys()) elif func is None: - return self.__tables[table].keys() + return list(self.__tables[table].keys()) elif func in self.__tables[table].keys(): return self.__tables[table][func] else: diff --git a/gramps/plugins/database/bsddb_support/read.py b/gramps/plugins/database/bsddb_support/read.py index ecb8b9c1e..af47026df 100644 --- a/gramps/plugins/database/bsddb_support/read.py +++ b/gramps/plugins/database/bsddb_support/read.py @@ -482,9 +482,9 @@ class DbBsddbRead(DbReadBase, Callback): Private implementation of get_table_func. """ if table is None: - return self.__tables.keys() + return list(self.__tables.keys()) elif func is None: - return self.__tables[table].keys() + return list(self.__tables[table].keys()) elif func in self.__tables[table].keys(): return self.__tables[table][func] else: @@ -509,7 +509,7 @@ class DbBsddbRead(DbReadBase, Callback): def get_table_names(self): """Return a list of valid table names.""" - return list(self.get_table_func()) + return self.get_table_func() def get_table_metadata(self, table_name): """Return the metadata for a valid table name.""" diff --git a/gramps/plugins/database/bsddb_support/write.py b/gramps/plugins/database/bsddb_support/write.py index 84ce1446e..70f343817 100644 --- a/gramps/plugins/database/bsddb_support/write.py +++ b/gramps/plugins/database/bsddb_support/write.py @@ -385,9 +385,9 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback): Private implementation of get_table_func. """ if table is None: - return self.__tables.keys() + return list(self.__tables.keys()) elif func is None: - return self.__tables[table].keys() + return list(self.__tables[table].keys()) elif func in self.__tables[table].keys(): return self.__tables[table][func] else: