Fix the index out of bounds bug in extract_feature_print.py (#560)

Check if the length of sys.argv is 6, instead of 5, to cover sys.argv[5]. Otherwise when the length is 6, it runs the else body and tries to access sys.argv[6] in line 13, which is an error.
This commit is contained in:
sungchura 2023-06-24 01:06:24 -07:00 committed by GitHub
parent a5c238a392
commit c6a7270811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import os, sys, traceback
# device=sys.argv[1]
n_part = int(sys.argv[2])
i_part = int(sys.argv[3])
if len(sys.argv) == 5:
if len(sys.argv) == 6:
exp_dir = sys.argv[4]
version = sys.argv[5]
else: