summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipaclient/remote_plugins/schema.py2
-rw-r--r--ipaserver/plugins/schema.py16
2 files changed, 13 insertions, 5 deletions
diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py
index 7d1b1e4fa..c84994dec 100644
--- a/ipaclient/remote_plugins/schema.py
+++ b/ipaclient/remote_plugins/schema.py
@@ -237,6 +237,8 @@ def _create_topic(schema):
topic['doc'] = ConcatenatedLazyText(schema['doc'])
if 'topic_topic' in schema:
topic['topic'] = str(schema['topic_topic'])
+ else:
+ topic['topic'] = None
return topic
diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py
index d66943c2e..80c485dfd 100644
--- a/ipaserver/plugins/schema.py
+++ b/ipaserver/plugins/schema.py
@@ -248,9 +248,12 @@ class topic_(MetaObject):
object.__setattr__(self, '_topic___topics', topics)
for command in self.api.Command():
- topic_name = command.topic
+ topic_value = command.topic
+ if topic_value is None:
+ continue
+ topic_name = unicode(topic_value)
- while topic_name is not None and topic_name not in topics:
+ while topic_name not in topics:
topic = topics[topic_name] = {'name': topic_name}
for package in self.api.packages:
@@ -267,11 +270,14 @@ class topic_(MetaObject):
topic['doc'] = unicode(module.__doc__).strip()
try:
- topic_name = module.topic
+ topic_value = module.topic
except AttributeError:
- topic_name = None
- else:
+ continue
+ if topic_value is not None:
+ topic_name = unicode(topic_value)
topic['topic_topic'] = topic_name
+ else:
+ topic.pop('topic_topic', None)
return self.__topics