assert package requirements are met for YAMLRenderer

This commit is contained in:
Tom Christie 2013-02-22 20:46:43 +00:00
parent b3019d9824
commit 3357a36e37

View File

@ -168,6 +168,8 @@ class YAMLRenderer(BaseRenderer):
"""
Renders *obj* into serialized YAML.
"""
assert yaml, 'YAMLRenderer requires pyyaml to be installed'
if data is None:
return ''