From dd6e329550012f960091ad68386ce67025f5290f Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Tue, 6 Jul 2010 13:04:05 -0400 Subject: Cleanup of my cleanup. --- .gitignore | 2 +- markdown/exceptions | 36 ------------------------------------ 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 markdown/exceptions diff --git a/.gitignore b/.gitignore index b363cfb..f921269 100644 --- a/.gitignore +++ b/.gitignore @@ -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 -- cgit v1.2.3