InMemoryDB: provide None for dbname
This commit is contained in:
@ -2025,13 +2025,14 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback):
|
|||||||
"""
|
"""
|
||||||
In DbGeneric, the database is in a text file at the path
|
In DbGeneric, the database is in a text file at the path
|
||||||
"""
|
"""
|
||||||
|
name = None
|
||||||
|
if self._directory:
|
||||||
filepath = os.path.join(self._directory, "name.txt")
|
filepath = os.path.join(self._directory, "name.txt")
|
||||||
try:
|
try:
|
||||||
with open(filepath, "r") as name_file:
|
with open(filepath, "r") as name_file:
|
||||||
name = name_file.readline().strip()
|
name = name_file.readline().strip()
|
||||||
except (OSError, IOError) as msg:
|
except (OSError, IOError) as msg:
|
||||||
LOG.error(str(msg))
|
LOG.error(str(msg))
|
||||||
name = None
|
|
||||||
return name
|
return name
|
||||||
|
|
||||||
def _order_by_person_key(self, person):
|
def _order_by_person_key(self, person):
|
||||||
|
Reference in New Issue
Block a user