plugin account, groupblog: user can erase all their microblogs at once

This commit is contained in:
souliane 2014-03-27 02:24:20 +01:00
commit f6673e0725

View file

@ -154,9 +154,12 @@ class Params(object):
if not self.storage.hasProfile(profile):
info(_('Trying to delete an unknown profile'))
return defer.fail(Failure(exceptions.ProfileUnknownError))
if not force and self.host.isConnected(profile):
info(_("Trying to delete a connected profile"))
return defer.fail(Failure(exceptions.ConnectedProfileError))
if self.host.isConnected(profile):
if force:
self.host.disconnect(profile)
else:
info(_("Trying to delete a connected profile"))
return defer.fail(Failure(exceptions.ConnectedProfileError))
return self.storage.deleteProfile(profile)
def getProfileName(self, profile_key, return_profile_keys = False):