示例#1
0
  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)
示例#2
0
文件: main.py 项目: ariofrio/oration
    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)