summaryrefslogtreecommitdiffstats
path: root/makeapi
diff options
context:
space:
mode:
Diffstat (limited to 'makeapi')
-rwxr-xr-xmakeapi23
1 files changed, 11 insertions, 12 deletions
diff --git a/makeapi b/makeapi
index 53269c508..ae664eca4 100755
--- a/makeapi
+++ b/makeapi
@@ -166,24 +166,19 @@ def validate_doc():
if getattr(cmd, 'NO_CLI', False):
continue
- if cmd.topic is not None:
- # Have we processed this module yet?
- if not topics.setdefault(cmd.topic, 0):
+ # Have we processed this module yet?
+ topic = cmd.topic
+ while topic is not None:
+ if not topics.setdefault(topic, 0):
# First time seeing this module, validate the module contents
- module = 'ipalib.plugins.%s' % cmd.topic
+ module = 'ipalib.plugins.%s' % topic
try:
mod = sys.modules[module]
except KeyError:
mod = importlib.import_module(module)
# See if there is a module topic, if so validate it
- topic = getattr(mod, 'topic', None)
- if topic is not None:
- if not is_i18n(topic[1]):
- src_file = inspect.getsourcefile(cmd_class)
- n_missing_mod_i18n += 1
- print("%s: topic in module \"%s\" is not "
- "internationalized" % (src_file, module))
+ next_topic = getattr(mod, 'topic', None)
# Does the module have documentation?
if mod.__doc__ is None:
@@ -197,9 +192,13 @@ def validate_doc():
n_missing_mod_i18n += 1
print("%s: module \"%s\" doc is not internationalized" %
(src_file, module))
+ else:
+ next_topic = None
# Increment the count of how many commands in this module
- topics[cmd.topic] = topics[cmd.topic] + 1
+ topics[topic] = topics[topic] + 1
+
+ topic = next_topic
# Does the command have documentation?
if cmd.__doc__ is None: