summaryrefslogtreecommitdiff
path: root/pygments/formatters/other.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2007-05-04 08:42:07 +0200
committergbrandl <devnull@localhost>2007-05-04 08:42:07 +0200
commit9270113fff36124ff0b5c7b593a3a1c8cb595095 (patch)
tree822913f753ec66601e7063bafa2b5d1d3562f414 /pygments/formatters/other.py
parent61baa23235b73b0272fad58e1c4a75a7320ff908 (diff)
downloadpygments-9270113fff36124ff0b5c7b593a3a1c8cb595095.tar.gz
[svn] Fix a few inconsistencies and nits, mainly in the docs.
Use the get_choice_opt function consistently.
Diffstat (limited to 'pygments/formatters/other.py')
-rw-r--r--pygments/formatters/other.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pygments/formatters/other.py b/pygments/formatters/other.py
index 9422dd23..bd375f32 100644
--- a/pygments/formatters/other.py
+++ b/pygments/formatters/other.py
@@ -10,6 +10,7 @@
"""
from pygments.formatter import Formatter
+from pygments.util import get_choice_opt
__all__ = ['NullFormatter', 'RawTokenFormatter']
@@ -54,7 +55,8 @@ class RawTokenFormatter(Formatter):
def __init__(self, **options):
Formatter.__init__(self, **options)
- self.compress = options.get('compress', '')
+ self.compress = get_choice_opt(options, 'compress',
+ ['', 'none', 'gz', 'bz2'], '')
def format(self, tokensource, outfile):
if self.compress == 'gz':