From f5c9ad8661023d874b49327a325f58efae86fd96 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 7 Jun 2013 20:24:39 +0530 Subject: [PATCH] MOBI Output: Fix regression that breaks conversion of some documents Fixes #1188635 [Mobi conversion crashed](https://bugs.launchpad.net/calibre/+bug/1188635) --- src/calibre/ebooks/mobi/mobiml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/mobi/mobiml.py b/src/calibre/ebooks/mobi/mobiml.py index 0bb66ec843..26edeab24c 100644 --- a/src/calibre/ebooks/mobi/mobiml.py +++ b/src/calibre/ebooks/mobi/mobiml.py @@ -489,7 +489,7 @@ class MobiMLizer(object): if elem.text: if istate.preserve: text = elem.text - elif (len(elem) > 0 and isspace(elem.text) and elem[0].tag and + elif (len(elem) > 0 and isspace(elem.text) and hasattr(elem[0].tag, 'rpartition') and elem[0].tag.rpartition('}')[-1] not in INLINE_TAGS): text = None else: