Code Duplication    Length = 20-20 lines in 2 locations

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

@@ 240-259 (lines=20) @@
237
    _merge(code, mcode)
238
239
240
def _update(code, _update, _app, _tips):
241
    if not _update:
242
        return code
243
244
    _update_list = [l.strip() for l in _update.split(",")]
245
    for l in _update_list:
246
        try:
247
            variant, comment = l.split("#")
248
        except ValueError:
249
            variant = l
250
            comment = None
251
252
        try:
253
            keys, value = variant.split("=")
254
            run_update(code, keys, value, comment, _app)
255
        except ValueError:
256
            print("Invalid format. print command \"--help\" get more info.")
257
            sys.exit(1)
258
259
    return code
260
261
262
def _backup(in_file_p):

ci/jenkins/scripts/yaml_processor.py 1 location

@@ 240-259 (lines=20) @@
237
    _merge(code, mcode)
238
239
240
def _update(code, _update, _app, _tips):
241
    if not _update:
242
        return code
243
244
    _update_list = [l.strip() for l in _update.split(",")]
245
    for l in _update_list:
246
        try:
247
            variant, comment = l.split("#")
248
        except ValueError:
249
            variant = l
250
            comment = None
251
252
        try:
253
            keys, value = variant.split("=")
254
            run_update(code, keys, value, comment, _app)
255
        except ValueError:
256
            print("Invalid format. print command \"--help\" get more info.")
257
            sys.exit(1)
258
259
    return code
260
261
262
def _backup(in_file_p):