diff options
author | gbrandl <devnull@localhost> | 2006-10-20 08:26:01 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2006-10-20 08:26:01 +0200 |
commit | f2cb957f4be1921963994027ed94c62ed743b30d (patch) | |
tree | 03ed3a6ea0d255a5ea54989c03f9d14ca60bccb3 | |
parent | f6e4754bf18034681371a2c7072f43825772e1a8 (diff) | |
download | pygments-f2cb957f4be1921963994027ed94c62ed743b30d.tar.gz |
[svn] Avoid failing if no docstring given for a formatter class. Fixes #121.
-rw-r--r-- | pygments/formatters/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pygments/formatters/__init__.py b/pygments/formatters/__init__.py index b701efb4..d112a88e 100644 --- a/pygments/formatters/__init__.py +++ b/pygments/formatters/__init__.py @@ -17,6 +17,8 @@ from pygments.formatters.other import NullFormatter, RawTokenFormatter def _doc_desc(obj): + if not obj.__doc__: + return '' res = '' for line in obj.__doc__.strip().splitlines(): if line.strip(): res += line.strip() + " " |