From e5007925866fac2a25094f1e18c3af6d8eac940d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 22 Jul 2013 18:47:25 +0530 Subject: [PATCH] Conversion: Fix a regression in the last release that broke conversion of a few files with comments just before a chapter start. See #1188635 --- src/calibre/ebooks/oeb/transforms/structure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/transforms/structure.py b/src/calibre/ebooks/oeb/transforms/structure.py index 50ee4d011d..e5014194ff 100644 --- a/src/calibre/ebooks/oeb/transforms/structure.py +++ b/src/calibre/ebooks/oeb/transforms/structure.py @@ -35,7 +35,7 @@ def at_start(elem): for x in body.iter(): if x is elem: return True - if getattr(x, 'tag', None) and x.tag.rpartition('}')[-1] in {'img', 'svg'}: + if hasattr(getattr(x, 'tag', None), 'rpartition') and x.tag.rpartition('}')[-1] in {'img', 'svg'}: return False if isspace(getattr(x, 'text', None)) and (x in ancestors or isspace(getattr(x, 'tail', None))): continue