mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-10 01:25:34 +00:00
fix IndexError when empty cassette throws CannotOverwriteCassetteException
This commit is contained in:
@@ -311,7 +311,7 @@ class Cassette(object):
|
|||||||
best_matches.sort(key=lambda t: t[0], reverse=True)
|
best_matches.sort(key=lambda t: t[0], reverse=True)
|
||||||
# Get the first best matches (multiple if equal matches)
|
# Get the first best matches (multiple if equal matches)
|
||||||
final_best_matches = []
|
final_best_matches = []
|
||||||
previous_nb_success = best_matches[0][0]
|
previous_nb_success = 0
|
||||||
for best_match in best_matches:
|
for best_match in best_matches:
|
||||||
nb_success = best_match[0]
|
nb_success = best_match[0]
|
||||||
# Do not keep matches that have 0 successes,
|
# Do not keep matches that have 0 successes,
|
||||||
|
|||||||
Reference in New Issue
Block a user