當前位置: 首頁>>代碼示例>>Python>>正文


Python TestFile.delete_file方法代碼示例

本文整理匯總了Python中model.testfile.TestFile.delete_file方法的典型用法代碼示例。如果您正苦於以下問題:Python TestFile.delete_file方法的具體用法?Python TestFile.delete_file怎麽用?Python TestFile.delete_file使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在model.testfile.TestFile的用法示例。


在下文中一共展示了TestFile.delete_file方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get

# 需要導入模塊: from model.testfile import TestFile [as 別名]
# 或者: from model.testfile.TestFile import delete_file [as 別名]
    def get(self):
        key = self.request.get(PARAM_KEY)
        master = self.request.get(PARAM_MASTER)
        builder = self.request.get(PARAM_BUILDER)
        test_type = self.request.get(PARAM_TEST_TYPE)
        name = self.request.get(PARAM_NAME)
        num_files = self.request.get(PARAM_NUM_FILES)
        before = self.request.get(PARAM_BEFORE)

        logging.debug(
            "Deleting File, master: %s, builder: %s, test_type: %s, name: %s, before: %s, key: %s.",
            master, builder, test_type, name, before, key)

        limit = int(num_files) if num_files else 1
        num_deleted = TestFile.delete_file(key, master, builder, test_type, name, before, limit)

        self.response.set_status(200)
        self.response.out.write("Deleted %d files." % num_deleted)
開發者ID:Drakey83,項目名稱:steamlink-sdk,代碼行數:20,代碼來源:testfilehandler.py

示例2: get

# 需要導入模塊: from model.testfile import TestFile [as 別名]
# 或者: from model.testfile.TestFile import delete_file [as 別名]
    def get(self):
        key = self.request.get(PARAM_KEY)
        # Intentionally don't munge the master from deprecated names here.
        # Assume anyone deleting files wants explicit control.
        master = self.request.get(PARAM_MASTER)
        builder = self.request.get(PARAM_BUILDER)
        test_type = self.request.get(PARAM_TEST_TYPE)
        build_number = self.request.get(PARAM_BUILD_NUMBER, default_value=None)
        name = self.request.get(PARAM_NAME)
        num_files = self.request.get(PARAM_NUM_FILES)
        before = self.request.get(PARAM_BEFORE)

        logging.debug(
            "Deleting File, master: %s, builder: %s, test_type: %s, build_number: %s, name: %s, before: %s, key: %s.",
            master, builder, test_type, build_number, name, before, key)

        limit = int(num_files) if num_files else 1
        num_deleted = TestFile.delete_file(key, master, builder, test_type, build_number, name, before, limit)

        self.response.set_status(200)
        self.response.out.write("Deleted %d files." % num_deleted)
開發者ID:darktears,項目名稱:blink-crosswalk,代碼行數:23,代碼來源:testfilehandler.py


注:本文中的model.testfile.TestFile.delete_file方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。