summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-04-08 16:06:52 +0200
committerJan Safranek <jsafrane@redhat.com>2013-04-08 16:06:52 +0200
commitd4ff2df651ff7d7f08c5c14bc3c1598ae0781056 (patch)
tree2afd55c2da4ee8c17db99c5584d39cdefeac949d /tools
parentc47c5c19c5857439db30e40d4a691f5b700adf5f (diff)
downloadopenlmi-providers-d4ff2df651ff7d7f08c5c14bc3c1598ae0781056.tar.gz
openlmi-providers-d4ff2df651ff7d7f08c5c14bc3c1598ae0781056.tar.xz
openlmi-providers-d4ff2df651ff7d7f08c5c14bc3c1598ae0781056.zip
Added more check for qualifiers.
Dictionary of element qualifiers can be None and we should check for it before accessing its elements.
Diffstat (limited to 'tools')
-rw-r--r--tools/openlmi-doc-class2rst11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/openlmi-doc-class2rst b/tools/openlmi-doc-class2rst
index d93cd11..81a0e23 100644
--- a/tools/openlmi-doc-class2rst
+++ b/tools/openlmi-doc-class2rst
@@ -158,6 +158,8 @@ class HtmlExporter(object):
deprecated = ""
values = None
maps = None
+ if not qualifiers:
+ return
for q in sorted(qualifiers):
if not q:
continue
@@ -212,10 +214,11 @@ class HtmlExporter(object):
print >>self.file, ""
for cls in class_hiearchy:
- description = cls.qualifiers.get("description")
- if description:
- self.print_escaped(description.params.value(), "")
- break
+ if cls.qualifiers:
+ description = cls.qualifiers.get("description")
+ if description:
+ self.print_escaped(description.params.value(), "")
+ break
print >>self.file, ""
self.print_keys(class_hiearchy)