def _get_file(cls, master, builder, test_type, filename): files = TestFile.get_files(master, builder, test_type, filename) if files: return files[0] file = TestFile() file.master = master file.builder = builder file.test_type = test_type file.name = filename file.data = "" return file
def _get_aggregate_file(cls, master, builder, test_type, filename, deprecated_master): files = TestFile.get_files(master, builder, test_type, None, filename) if files: return files[0] if deprecated_master: files = TestFile.get_files(deprecated_master, builder, test_type, None, filename) if files: deprecated_file = files[0] # Change the master so it gets saved out with the new master name. deprecated_file.master = master return deprecated_file file = TestFile() file.master = master file.builder = builder file.test_type = test_type file.build_number = None file.name = filename file.data = "" return file