1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Split persister errors into CassetteNotFoundError and CassetteDecodeError (#681)

This commit is contained in:
Amos Ng
2023-06-26 23:27:35 +07:00
committed by GitHub
parent 8c03c37df4
commit d99593bcd3
5 changed files with 63 additions and 7 deletions

View File

@@ -11,7 +11,7 @@ from ._handle_coroutine import handle_coroutine
from .errors import UnhandledHTTPRequestError
from .matchers import get_matchers_results, method, requests_match, uri
from .patch import CassettePatcherBuilder
from .persisters.filesystem import FilesystemPersister
from .persisters.filesystem import CassetteDecodeError, CassetteNotFoundError, FilesystemPersister
from .record_mode import RecordMode
from .serializers import yamlserializer
from .util import partition_dict
@@ -352,7 +352,7 @@ class Cassette:
self.append(request, response)
self.dirty = False
self.rewound = True
except ValueError:
except (CassetteDecodeError, CassetteNotFoundError):
pass
def __str__(self):