Don't explicitly raise a TroveboxError if False is returned,

rely on frontend to issue an error code.

This also means we don't need to test for this in unit tests.
This commit is contained in:
sneakypete81 2013-09-11 17:47:09 +01:00
parent 6b3f010920
commit bf437ffc7e
10 changed files with 20 additions and 133 deletions

View file

@ -39,12 +39,9 @@ class ApiAction(ApiBase):
Returns True if successful.
Raises a TroveboxError if not.
"""
result = self._client.post("/action/%s/delete.json" %
self._extract_id(action),
**kwds)["result"]
if not result:
raise TroveboxError("Delete response returned False")
return result
return self._client.post("/action/%s/delete.json" %
self._extract_id(action),
**kwds)["result"]
def view(self, action, **kwds):
"""