def delete(self): key_name = self.request.get('location') result = {} try: blob.delete_blob(get_container('texts'), key_name) result = {'result':'success'} except Exception: result = {'result':'failure', 'reason':'exception was thrown'} # TODO get the name of the exception here self.response.out.write(result)
def delete(self): location = self.request.get("location") logging.info("Deleting data at location " + location) result = None try: blob.delete_blob(get_container("texts"), location) result = {"result": "success"} except Exception: # TODO get the name of the exception here result = {"result": "failure", "reason": "exception was thrown"} self.response.out.write(result)