core, bridge: better GenericException handling

This commit is contained in:
Goffi 2013-12-17 00:56:39 +01:00
commit b6aaecc5c2

View file

@ -77,11 +77,11 @@ class ProfileManager(urwid.WidgetWrap):
def _profileCreationFailure(self, reason):
self.host.removePopUp()
if reason=="CONFLICT":
if reason=="ConflictError":
message=_("A profile with this name already exists")
elif reason=="CANCELED":
elif reason=="CancelError":
message=_("Profile creation cancelled by backend")
elif reason=="DATABASE":
elif reason=="DATABASE": # FIXME: doesn't seem to exist !
message=_("Database error")
else:
message=_("Unknown reason (%s)") % reason