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

Fix issue #36 - error message for unregistered matcher was broken

This commit is contained in:
Kevin McCarthy
2013-09-29 15:56:13 -10:00
parent cf8646d8d6
commit deed8cab97
6 changed files with 17 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ class VCR(object):
serializer='yaml',
cassette_library_dir=None,
record_mode="once",
match_on=['url','method'],
match_on=['url', 'method'],
):
self.serializer = serializer
self.match_on = match_on
@@ -42,10 +42,9 @@ class VCR(object):
try:
matchers = [self.matchers[m] for m in matcher_names]
except KeyError:
print "Matcher {0} doesn't exist or isn't registered".format(
matcher_name
raise KeyError(
"Matcher {0} doesn't exist or isn't registered".format(m)
)
raise KeyError
return matchers
def use_cassette(self, path, **kwargs):