* src/GrampsDb/_GrampsDbBase.py: error message on disk space full
* src/Bookmarks.py: removed deleted items svn: r7375
This commit is contained in:
@@ -413,18 +413,26 @@ class GrampsDbBase(GrampsDBCallback):
|
||||
handle = str(obj.handle)
|
||||
|
||||
self._update_reference_map(obj, transaction)
|
||||
|
||||
if transaction.batch:
|
||||
data_map[handle] = obj.serialize()
|
||||
old_data = None
|
||||
else:
|
||||
old_data = data_map.get(handle)
|
||||
new_data = obj.serialize()
|
||||
transaction.add(key, handle, old_data, new_data)
|
||||
if old_data:
|
||||
update_list.append((handle, new_data))
|
||||
|
||||
try:
|
||||
if transaction.batch:
|
||||
data_map[handle] = obj.serialize()
|
||||
old_data = None
|
||||
else:
|
||||
add_list.append((handle, new_data))
|
||||
old_data = data_map.get(handle)
|
||||
new_data = obj.serialize()
|
||||
transaction.add(key, handle, old_data, new_data)
|
||||
if old_data:
|
||||
update_list.append((handle, new_data))
|
||||
else:
|
||||
add_list.append((handle, new_data))
|
||||
except db.DBNoSpaceError, msg:
|
||||
from QuestionDialog import ErrorDialog
|
||||
|
||||
ErrorDialog(_("Out of disk space"),
|
||||
_("Your data cannot be saved because you are out "
|
||||
"of disk space. Please free up some disk space "
|
||||
"and try again.\n\n%s") % msg[1])
|
||||
return old_data
|
||||
|
||||
def commit_person(self, person, transaction, change_time=None):
|
||||
|
Reference in New Issue
Block a user