summaryrefslogtreecommitdiff
path: root/pygments/styles/__init__.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-02-12 23:38:46 +0100
committerGeorg Brandl <georg@python.org>2007-02-12 23:38:46 +0100
commit0678bc4fea71984ab19ab082cb711d772796fae3 (patch)
tree7813371046f03132d690b8556c857fc453e6c9b6 /pygments/styles/__init__.py
parentb62d1dc031f5201870c2466882da8f625a015cf3 (diff)
downloadpygments-git-0678bc4fea71984ab19ab082cb711d772796fae3.tar.gz
[svn] Quite a few things:
- new pygmentize options, -F for filters and -H for detail help. - an automatically-created formatter map - better HTML formatter subclassing
Diffstat (limited to 'pygments/styles/__init__.py')
-rw-r--r--pygments/styles/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py
index 1b75dcbc..cd172adf 100644
--- a/pygments/styles/__init__.py
+++ b/pygments/styles/__init__.py
@@ -8,7 +8,9 @@
:copyright: 2006-2007 by Georg Brandl.
:license: BSD, see LICENSE for more details.
"""
+
from pygments.plugin import find_plugin_styles
+from pygments.util import ClassNotFound
#: Maps style names to 'submodule::classname'.
@@ -45,12 +47,12 @@ def get_style_by_name(name):
try:
mod = __import__('pygments.styles.' + mod, None, None, [cls])
except ImportError:
- raise ValueError("Could not find style module %r" % mod +
+ raise ClassNotFound("Could not find style module %r" % mod +
(builtin and ", though it should be builtin") + ".")
try:
return getattr(mod, cls)
except AttributeError:
- raise ValueError("Could not find style class %r in style module." % cls)
+ raise ClassNotFound("Could not find style class %r in style module." % cls)
def get_all_styles():