python -c 'import yaml, sys; yaml.safe_load(sys.stdin)' < cfg.yaml

If your file contains valid yaml, it will do nothing.

[tmp]$ python -c 'import yaml, sys; yaml.safe_load(sys.stdin)' < cfg.yaml

If the file does not contain valid yaml, you'll get a traceback. From that traceback you should be able to identify the problem.

[tmp]$ python -c 'import yaml, sys; yaml.safe_load(sys.stdin)' < cfg.yaml
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  ...
could not find expected ':'
  in "<stdin>", line 5, column 1

The traceback contains a lot of lines that are very useful, but near the end you'll find the line number and column of the error.

Eat 'em, freeze 'em, enjoy 'em all week long!
Tayler Tayler (75)
35 minutes

Nothing says good morning quite like a breakfast sandwich. From the doughiness of the muffin to the eggs' fluffiness to the cheese's gooeyness, breakfast sandwiches are a great start to your morning.