summaryrefslogtreecommitdiff
path: root/markdown/extensions/headerid.py
diff options
context:
space:
mode:
authorCraig de Stigter <craig.destigter@koordinates.com>2011-04-18 16:51:12 +1200
committerCraig de Stigter <craig.destigter@koordinates.com>2011-04-18 16:51:12 +1200
commit8bc4135947d9a2fc1749ebc4a8cdbd4d72d7a74e (patch)
tree7faa86d9ba1d0de861202f5f80739b8b677b50b4 /markdown/extensions/headerid.py
parent80aa9a2d52f2fcbffd6e15d208b8ead5886900b1 (diff)
downloadpython-markdown-8bc4135947d9a2fc1749ebc4a8cdbd4d72d7a74e.tar.gz
sane logging. remove sys.exit() calls (libraries should never ever call sys.exit()) and raise appropriate exceptions instead. backwards incompatible insofar as custom extensions may need tweaks if they're using old markdown logging (but they shouldn't, it was gross)
Diffstat (limited to 'markdown/extensions/headerid.py')
-rw-r--r--markdown/extensions/headerid.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py
index 5e9793e..6d64a43 100644
--- a/markdown/extensions/headerid.py
+++ b/markdown/extensions/headerid.py
@@ -67,8 +67,6 @@ Dependencies:
import markdown
from markdown.util import etree
-from logging import CRITICAL
-from markdown.md_logging import message
import re
from string import ascii_lowercase, digits, punctuation
@@ -121,7 +119,7 @@ class HeaderIdProcessor(markdown.blockprocessors.BlockProcessor):
blocks.insert(0, after)
else:
# This should never happen, but just in case...
- message(CRITICAL, "We've got a problem header!")
+ raise ValueError("Encountered a problem header: %r" % block)
def _get_meta(self):
""" Return meta data suported by this ext as a tuple """