Code Duplication    Length = 13-13 lines in 2 locations

ci/jenkins/scripts/yaml_processor.py 1 location

@@ 275-287 (lines=13) @@
272
    shutil.copyfile(in_file_p, backup_p)  # 复制文件
273
274
275
def _recovery(in_file_p):
276
    backup_p = in_file_p + ".bak"
277
278
    if not os.path.exists(in_file_p):
279
        print("File {} not exists.".format(in_file_p))
280
        sys.exit(1)
281
    elif not os.path.exists(backup_p):
282
        print("Backup file not exists")
283
        sys.exit(0)
284
285
    os.remove(in_file_p)
286
287
    os.rename(backup_p, in_file_p)
288
289
290
# master merge target

tests/milvus_benchmark/ci/scripts/yaml_processor.py 1 location

@@ 275-287 (lines=13) @@
272
    shutil.copyfile(in_file_p, backup_p)  # 复制文件
273
274
275
def _recovery(in_file_p):
276
    backup_p = in_file_p + ".bak"
277
278
    if not os.path.exists(in_file_p):
279
        print("File {} not exists.".format(in_file_p))
280
        sys.exit(1)
281
    elif not os.path.exists(backup_p):
282
        print("Backup file not exists")
283
        sys.exit(0)
284
285
    os.remove(in_file_p)
286
287
    os.rename(backup_p, in_file_p)
288
289
290
# master merge target