diff --git a/yamllint/linter.py b/yamllint/linter.py index 8af85a5..b8fb9e9 100644 --- a/yamllint/linter.py +++ b/yamllint/linter.py @@ -94,6 +94,9 @@ def get_syntax_error(buffer): def _run(buffer, conf): + assert hasattr(buffer, '__getitem__'), \ + '_run() argument must be a buffer, not a stream' + # If the document contains a syntax error, save it and yield it at the # right line syntax_error = get_syntax_error(buffer)