aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2014-08-25 22:04:10 -0400
committerWaylan Limberg <waylan@gmail.com>2014-08-25 22:04:10 -0400
commit0b5e08c8816116e6de0d71a56c2867b165896065 (patch)
treed42ef0715c005218ad08aefc9b62affb8243d905
parent8c29487fe973f9007510dd6c4f32083b8d4d0896 (diff)
downloadmarkdown-0b5e08c8816116e6de0d71a56c2867b165896065.tar.gz
markdown-0b5e08c8816116e6de0d71a56c2867b165896065.tar.bz2
markdown-0b5e08c8816116e6de0d71a56c2867b165896065.zip
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.
-rw-r--r--markdown/__main__.py2
1 files changed, 1 insertions, 1 deletions
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