コード例 #1
0
ファイル: main.py プロジェクト: ariofrio/oration-ariofrio
  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)