diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | markdown/exceptions | 36 |
2 files changed, 1 insertions, 37 deletions
@@ -1,8 +1,8 @@ *.pyc *.bak -*.tmp *.swp test-output.html build/* dist/* +tmp/* MANIFEST diff --git a/markdown/exceptions b/markdown/exceptions deleted file mode 100644 index 463be15..0000000 --- a/markdown/exceptions +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -import logging -from logging import DEBUG, INFO, WARN, ERROR, CRITICAL -import sys -import warnings - -# -# Exceptions -# - -class MarkdownException(Exception): - """ A Markdown Exception. """ - pass - - -class MarkdownWarning(Warning): - """ A Markdown Warning. """ - pass - - -# -# Global functions -# - -def message(level, text): - """ A wrapper method for logging debug messages. """ - logger = logging.getLogger('MARKDOWN') - if logger.handlers: - # The logger is configured - logger.log(level, text) - if level > WARN: - sys.exit(0) - elif level > WARN: - raise MarkdownException, text - else: - warnings.warn(text, MarkdownWarning)
\ No newline at end of file |