def load_yaml(raw_yaml, error_message, filename=None): try: return yaml_loader.load(raw_yaml, filename) except yaml.parser.ParserError, ex: raise DSLParsingFormatException(-1, '{0}: Illegal yaml; {1}' .format(error_message, ex))
def load_yaml(raw_yaml, error_message, filename=None): try: return yaml_loader.load(raw_yaml, filename) except yaml.parser.ParserError as ex: raise DSLParsingFormatException(-1, '{0}: Illegal yaml; {1}' .format(error_message, ex))