[library-web] [mallard] the role attribute of title is not mandatory
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] [mallard] the role attribute of title is not mandatory
- Date: Mon, 22 Feb 2010 07:43:17 +0000 (UTC)
commit 440cabc86af96b1f200ffd237549fe5de1b540f5
Author: Frédéric Péters <fpeters 0d be>
Date: Mon Feb 22 08:41:43 2010 +0100
[mallard] the role attribute of title is not mandatory
src/modtypes/mallard.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/modtypes/mallard.py b/src/modtypes/mallard.py
index 98f7e58..8f989f4 100644
--- a/src/modtypes/mallard.py
+++ b/src/modtypes/mallard.py
@@ -79,7 +79,10 @@ class MallardPage:
title_tag = element.find('{%s}title' % MAL_NS)
if title_tag is not None:
type = title_tag.attrib['type']
- role = title_tag.attrib['role']
+ try:
+ role = title_tag.attrib['role']
+ except KeyError:
+ role = None
if type == 'link' and not role:
self.link_title = dup_node(title_tag)
if type == 'sort':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]