当前位置: 首页>>代码示例>>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;未经允许,请勿转载。