comparison MoinMoin/parser/text_rst.py @ 5711:58a9aa0d67bd

Raise exceptions as recommended in PEP 8.
author Pascal Volk <user@localhost.localdomain.org>
date Mon, 05 Jul 2010 23:21:21 +0000
parents 0c424b6dc029
children 97208f67798f
comparison
equal deleted inserted replaced
5710:011bbc010d40 5711:58a9aa0d67bd
150 required_version = (0, 3, 10) 150 required_version = (0, 3, 10)
151 current_version = tuple([int(i) for i in (docutils.__version__.split('.') + ['0', '0'])[:3]]) 151 current_version = tuple([int(i) for i in (docutils.__version__.split('.') + ['0', '0'])[:3]])
152 if current_version < required_version: 152 if current_version < required_version:
153 err = 'ERROR: The installed docutils version is %s;' % ('.'.join([str(i) for i in current_version])) 153 err = 'ERROR: The installed docutils version is %s;' % ('.'.join([str(i) for i in current_version]))
154 err += ' version %s or later is required.' % ('.'.join([str(i) for i in required_version])) 154 err += ' version %s or later is required.' % ('.'.join([str(i) for i in required_version]))
155 raise RuntimeError, err 155 raise RuntimeError(err)
156 156
157 def translate(self): 157 def translate(self):
158 visitor = MoinTranslator(self.document, 158 visitor = MoinTranslator(self.document,
159 self.formatter, 159 self.formatter,
160 self.request, 160 self.request,