diff --git a/gramps/gen/db/generic.py b/gramps/gen/db/generic.py index efb07849f..0d78ca884 100644 --- a/gramps/gen/db/generic.py +++ b/gramps/gen/db/generic.py @@ -2554,17 +2554,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback): _("Version") _("Data version") """ - last_backup = "n/a" - backups = sorted(glob.glob(os.path.join( - self._directory, "backup-*.gramps")), reverse=True) - if backups: - path, filename = os.path.split(backups[0]) - filename, ext = os.path.splitext(filename) - if filename.count("-") == 6: - backup, year, month, day, hour, minute, second = filename.split("-") - last_backup = time.strftime('%x %X', time.localtime(time.mktime( - (int(year), int(month), int(day), int(hour), int(minute), int(second), - 0, 0, 0)))) return { _("Number of people"): self.get_number_of_people(), _("Number of families"): self.get_number_of_families(), @@ -2577,8 +2566,6 @@ class DbGeneric(DbWriteBase, DbReadBase, UpdateCallback, Callback): _("Number of notes"): self.get_number_of_notes(), _("Number of tags"): self.get_number_of_tags(), _("Data version"): ".".join([str(v) for v in self.VERSION]), - _("Backups, count"): str(len(backups)), - _("Backups, last"): last_backup, } def _order_by_person_key(self, person): diff --git a/gramps/plugins/db/dbapi/inmemorydb.py b/gramps/plugins/db/dbapi/inmemorydb.py index 59926e78a..f431e8d53 100644 --- a/gramps/plugins/db/dbapi/inmemorydb.py +++ b/gramps/plugins/db/dbapi/inmemorydb.py @@ -64,16 +64,3 @@ class InMemoryDB(DBAPI): force_bsddb_upgrade, force_bsddb_downgrade, force_python_upgrade) - # Dictionary-specific load: - from gramps.plugins.importer.importxml import importData - from gramps.cli.user import User - if self._directory: - backups = sorted(glob.glob(os.path.join( - self._directory, "backup-*.gramps")), reverse=True) - if backups: - filename = backups[0] - if os.path.isfile(filename): - importData(self, filename, User()) - self.reindex_reference_map(lambda progress: None) - self.rebuild_secondary(lambda progress: None) - self.has_changed = False