Mercurial > libervia-backend
diff src/memory/memory.py @ 751:1def5b7edf9f
core, bridge: better GenericException handling
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 17 Dec 2013 00:56:39 +0100 |
parents | 5aff0beddb28 |
children | efa0e0f57950 |
line wrap: on
line diff
--- a/src/memory/memory.py Mon Dec 16 17:49:54 2013 +0100 +++ b/src/memory/memory.py Tue Dec 17 00:56:39 2013 +0100 @@ -164,9 +164,9 @@ """ if self.storage.hasProfile(profile): info(_('The profile name already exists')) - return defer.fail(Failure(u"CONFLICT")) + return defer.fail(Failure(exceptions.ConflictError)) if not self.host.trigger.point("ProfileCreation", profile): - return defer.fail(Failure(u"CANCEL")) + return defer.fail(Failure(exceptions.CancelError)) return self.storage.createProfile(profile) def deleteProfile(self, profile):