From 5fd415ea2d1758c7ce1c716c6bf75ee712045af9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 11 Apr 2012 10:33:35 +0530 Subject: [PATCH] ... --- src/calibre/gui2/convert/__init__.py | 1 + src/odf/odf2xhtml.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/convert/__init__.py b/src/calibre/gui2/convert/__init__.py index 73b478ac47..222d410522 100644 --- a/src/calibre/gui2/convert/__init__.py +++ b/src/calibre/gui2/convert/__init__.py @@ -249,6 +249,7 @@ class Widget(QWidget): def set_value_handler(self, g, val): + 'Return True iff you handle setting the value for g' return False def post_set_value(self, g, val): diff --git a/src/odf/odf2xhtml.py b/src/odf/odf2xhtml.py index 697228e005..4f79574043 100644 --- a/src/odf/odf2xhtml.py +++ b/src/odf/odf2xhtml.py @@ -760,7 +760,10 @@ class ODF2XHTML(handler.ContentHandler): def s_draw_object_ole(self, tag, attrs): """ A is embedded OLE object in the document (e.g. MS Graph). """ - class_id = attrs[(DRAWNS,"class-id")] + try: + class_id = attrs[(DRAWNS,"class-id")] + except KeyError: # Added by Kovid to ignore without the right + return # attributes if class_id and class_id.lower() == "00020803-0000-0000-c000-000000000046": ## Microsoft Graph 97 Chart tagattrs = { 'name':'object_ole_graph', 'class':'ole-graph' } self.opentag('a', tagattrs)