#!/usr/bin/env python
import sys, yaml, json
try:
    json.dump(yaml.safe_load(sys.stdin), sys.stdout, indent=2, separators=(',', ': '))
except yaml.YAMLError, e:
    sys.stderr.write("YAML error:\n%s\n" % e)
    sys.exit(1)

@@ -151,17 +151,19 @@
 AMLError
-,
+ as
  e:%0A    

Support python 3 exceptions