Handle empty objects list

This commit is contained in:
Eric Holscher 2015-08-14 14:54:28 -07:00
parent 243549f2fe
commit dfbae94963

View File

@ -168,6 +168,8 @@ class DotNetSphinxMapper(SphinxMapperBase):
del self.namespaces[key] del self.namespaces[key]
def output_rst(self, root, source_suffix): def output_rst(self, root, source_suffix):
if not len(self.objects):
raise ExtensionError("No API objects exist. Can't continue")
for id, obj in self.objects.items(): for id, obj in self.objects.items():
if not obj or not obj.top_level_object: if not obj or not obj.top_level_object: