mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
assert package requirements are met for YAMLRenderer
This commit is contained in:
parent
b3019d9824
commit
3357a36e37
|
@ -168,6 +168,8 @@ class YAMLRenderer(BaseRenderer):
|
||||||
"""
|
"""
|
||||||
Renders *obj* into serialized YAML.
|
Renders *obj* into serialized YAML.
|
||||||
"""
|
"""
|
||||||
|
assert yaml, 'YAMLRenderer requires pyyaml to be installed'
|
||||||
|
|
||||||
if data is None:
|
if data is None:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user