From bc9149fb19bd5508e4bf768d3c1cf76e009f991d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 14 Jan 2011 15:09:03 -0700 Subject: [PATCH] version 0.7.40 --- Changelog.yaml | 2 +- src/calibre/constants.py | 2 +- src/calibre/utils/formatter_functions.py | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changelog.yaml b/Changelog.yaml index 9e2088d165..3a74248835 100644 --- a/Changelog.yaml +++ b/Changelog.yaml @@ -4,7 +4,7 @@ # for important features/bug fixes. # Also, each release can have new and improved recipes. -- version: 0.7.39 +- version: 0.7.40 date: 2011-01-14 new features: diff --git a/src/calibre/constants.py b/src/calibre/constants.py index e2fe1df942..5c4a228efb 100644 --- a/src/calibre/constants.py +++ b/src/calibre/constants.py @@ -2,7 +2,7 @@ __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net' __docformat__ = 'restructuredtext en' __appname__ = 'calibre' -__version__ = '0.7.39' +__version__ = '0.7.40' __author__ = "Kovid Goyal " import re diff --git a/src/calibre/utils/formatter_functions.py b/src/calibre/utils/formatter_functions.py index 7237f227e2..a66d787095 100644 --- a/src/calibre/utils/formatter_functions.py +++ b/src/calibre/utils/formatter_functions.py @@ -83,7 +83,10 @@ class BuiltinFormatterFunction(FormatterFunction): formatter_functions.register_builtin(self) eval_func = inspect.getmembers(self.__class__, 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) class BuiltinStrcmp(BuiltinFormatterFunction):