version 0.7.40

This commit is contained in:
Kovid Goyal 2011-01-14 15:09:03 -07:00
parent 01fbd5f532
commit bc9149fb19
3 changed files with 6 additions and 3 deletions

View File

@ -4,7 +4,7 @@
# for important features/bug fixes. # for important features/bug fixes.
# Also, each release can have new and improved recipes. # Also, each release can have new and improved recipes.
- version: 0.7.39 - version: 0.7.40
date: 2011-01-14 date: 2011-01-14
new features: new features:

View File

@ -2,7 +2,7 @@ __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
__docformat__ = 'restructuredtext en' __docformat__ = 'restructuredtext en'
__appname__ = 'calibre' __appname__ = 'calibre'
__version__ = '0.7.39' __version__ = '0.7.40'
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>" __author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
import re import re

View File

@ -83,7 +83,10 @@ class BuiltinFormatterFunction(FormatterFunction):
formatter_functions.register_builtin(self) formatter_functions.register_builtin(self)
eval_func = inspect.getmembers(self.__class__, eval_func = inspect.getmembers(self.__class__,
lambda x: inspect.ismethod(x) and x.__name__ == 'evaluate') lambda x: inspect.ismethod(x) and x.__name__ == 'evaluate')
lines = [l[4:] for l in inspect.getsourcelines(eval_func[0][1])[0]] try:
lines = [l[4:] for l in inspect.getsourcelines(eval_func[0][1])[0]]
except:
lines = []
self.program_text = ''.join(lines) self.program_text = ''.join(lines)
class BuiltinStrcmp(BuiltinFormatterFunction): class BuiltinStrcmp(BuiltinFormatterFunction):