Skip to content

Commit

Permalink
Fix the index out of bounds bug in extract_feature_print.py (#560)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sungchura authored Jun 24, 2023
1 parent a5c238a commit c6a7270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extract_feature_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 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:
Expand Down

0 comments on commit c6a7270

Please sign in to comment.