diff options
author | Jan Safranek <jsafrane@redhat.com> | 2013-04-08 16:06:52 +0200 |
---|---|---|
committer | Jan Safranek <jsafrane@redhat.com> | 2013-04-08 16:06:52 +0200 |
commit | d4ff2df651ff7d7f08c5c14bc3c1598ae0781056 (patch) | |
tree | 2afd55c2da4ee8c17db99c5584d39cdefeac949d /tools | |
parent | c47c5c19c5857439db30e40d4a691f5b700adf5f (diff) | |
download | openlmi-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-class2rst | 11 |
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) |