diff --git a/keystoneauth1/fixture/serializer.py b/keystoneauth1/fixture/serializer.py index f30bd7be..52765e4c 100644 --- a/keystoneauth1/fixture/serializer.py +++ b/keystoneauth1/fixture/serializer.py @@ -89,6 +89,10 @@ class YamlJsonSerializer(betamax.serializers.base.BaseSerializer): def deserialize(self, cassette_data): try: - return yaml.safe_load(cassette_data) + deserialized = yaml.safe_load(cassette_data) except yaml.error.YAMLError: - return {} + deserialized = None + + if deserialized is not None: + return deserialized + return {}