From 0b5e08c8816116e6de0d71a56c2867b165896065 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Mon, 25 Aug 2014 22:04:10 -0400 Subject: Fixed a small bug in --extension_configs CLI option. This needs to work with the JSON lib if PyYaml isn't available. Therefore, we can't catch a yaml specific exception. The tests are fine using a yaml specific exception as the yaml lib is required by the testing framework anyway. So yaml is always available when running the tests. --- markdown/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/__main__.py b/markdown/__main__.py index 60706b1..8dd8d38 100644 --- a/markdown/__main__.py +++ b/markdown/__main__.py @@ -78,7 +78,7 @@ def parse_options(args=None, values=None): with codecs.open(options.configfile, mode="r", encoding=options.encoding) as fp: try: extension_configs = yaml.load(fp) - except yaml.YAMLError as e: + except Exception as e: message = "Failed parsing extension config file: %s" % options.configfile e.args = (message,) + e.args[1:] raise -- cgit v1.2.3