4650: Error raised when family tree created with name that already exists
svn: r16631
This commit is contained in:
parent
ea81886c51
commit
7c1b26d969
@ -339,7 +339,7 @@ class CLIDbManager(object):
|
|||||||
name_file.write(new_text)
|
name_file.write(new_text)
|
||||||
name_file.close()
|
name_file.close()
|
||||||
except (OSError, IOError), msg:
|
except (OSError, IOError), msg:
|
||||||
ERROR(_("Could not rename family tree"),
|
CLIDbManager.ERROR(_("Could not rename family tree"),
|
||||||
str(msg))
|
str(msg))
|
||||||
return None, None
|
return None, None
|
||||||
return old_text, new_text
|
return old_text, new_text
|
||||||
|
@ -449,7 +449,7 @@ class DbManager(CLIDbManager):
|
|||||||
del proc
|
del proc
|
||||||
|
|
||||||
if status != 0:
|
if status != 0:
|
||||||
ERROR(
|
DbManager.ERROR(
|
||||||
_("Rename failed"),
|
_("Rename failed"),
|
||||||
_("An attempt to rename a version failed "
|
_("An attempt to rename a version failed "
|
||||||
"with the following message:\n\n%s") % message
|
"with the following message:\n\n%s") % message
|
||||||
@ -465,7 +465,7 @@ class DbManager(CLIDbManager):
|
|||||||
node = self.model.get_iter(path)
|
node = self.model.get_iter(path)
|
||||||
filename = self.model.get_value(node, FILE_COL)
|
filename = self.model.get_value(node, FILE_COL)
|
||||||
if self.existing_name(new_text, skippath=path):
|
if self.existing_name(new_text, skippath=path):
|
||||||
ERROR(_("Could not rename the Family Tree."),
|
DbManager.ERROR(_("Could not rename the Family Tree."),
|
||||||
_("Family Tree already exists, choose a unique name."))
|
_("Family Tree already exists, choose a unique name."))
|
||||||
return
|
return
|
||||||
old_text, new_text = self.rename_database(filename, new_text)
|
old_text, new_text = self.rename_database(filename, new_text)
|
||||||
@ -568,7 +568,7 @@ class DbManager(CLIDbManager):
|
|||||||
os.unlink(os.path.join(top, filename))
|
os.unlink(os.path.join(top, filename))
|
||||||
os.rmdir(self.data_to_delete[1])
|
os.rmdir(self.data_to_delete[1])
|
||||||
except (IOError, OSError), msg:
|
except (IOError, OSError), msg:
|
||||||
ERROR(_("Could not delete family tree"),
|
DbManager.ERROR(_("Could not delete family tree"),
|
||||||
str(msg))
|
str(msg))
|
||||||
# rebuild the display
|
# rebuild the display
|
||||||
self.__populate()
|
self.__populate()
|
||||||
@ -592,7 +592,7 @@ class DbManager(CLIDbManager):
|
|||||||
del proc
|
del proc
|
||||||
|
|
||||||
if status != 0:
|
if status != 0:
|
||||||
ERROR(
|
DbManager.ERROR(
|
||||||
_("Deletion failed"),
|
_("Deletion failed"),
|
||||||
_("An attempt to delete a version failed "
|
_("An attempt to delete a version failed "
|
||||||
"with the following message:\n\n%s") % message
|
"with the following message:\n\n%s") % message
|
||||||
@ -672,7 +672,7 @@ class DbManager(CLIDbManager):
|
|||||||
try:
|
try:
|
||||||
restore(dbase)
|
restore(dbase)
|
||||||
except DbException, msg:
|
except DbException, msg:
|
||||||
ERROR(_("Error restoring backup data"), msg)
|
DbManager.ERROR(_("Error restoring backup data"), msg)
|
||||||
|
|
||||||
self.__end_cursor()
|
self.__end_cursor()
|
||||||
|
|
||||||
@ -707,7 +707,7 @@ class DbManager(CLIDbManager):
|
|||||||
try:
|
try:
|
||||||
self._create_new_db()
|
self._create_new_db()
|
||||||
except (OSError, IOError), msg:
|
except (OSError, IOError), msg:
|
||||||
ERROR(_("Could not create family tree"),
|
DbManager.ERROR(_("Could not create family tree"),
|
||||||
str(msg))
|
str(msg))
|
||||||
self.new.set_sensitive(True)
|
self.new.set_sensitive(True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user