Don't decode empty response from DELETE

On success, DELETE returns no data.  Attempting to parse it into JSON causes
a crash.  Check for content before parsing.
diff --git a/ b/
index f3d7f3a..77ed0b9 100644
--- a/
+++ b/
@@ -138,7 +138,7 @@
       task_id: An integer id for the task.
-      A JSON encoded response.
+      A JSON encoded response, if there is content in the response.
       HTTPError: a 4XX client error or 5XX server error response was returned.
@@ -148,4 +148,7 @@
             self._Url('tasks/%d' % task_id),
-    return r.json()
+    # DELETE returns nothing on success, don't try and parse it.
+    if len(r.content) > 0:
+      return r.json()
+    return