aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-09-16 14:13:03 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-09-16 14:13:03 +0000
commitaee08a1bf2142c4cee59563db59db53d9454ece4 (patch)
tree9fd87a1accd9849b87b0e824b08c92363ecf9ead
parentf0b2943aabb2e1c326b72988c70954428d033703 (diff)
downloadmsec-aee08a1bf2142c4cee59563db59db53d9454ece4.tar
msec-aee08a1bf2142c4cee59563db59db53d9454ece4.tar.gz
msec-aee08a1bf2142c4cee59563db59db53d9454ece4.tar.bz2
msec-aee08a1bf2142c4cee59563db59db53d9454ece4.tar.xz
msec-aee08a1bf2142c4cee59563db59db53d9454ece4.zip
sorting man according to plugin
-rwxr-xr-xsrc/msec/man.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/msec/man.py b/src/msec/man.py
index d00838a..adffae6 100755
--- a/src/msec/man.py
+++ b/src/msec/man.py
@@ -268,8 +268,18 @@ msec = MSEC(log)
print header
-for variable in config.SETTINGS:
- callback, params = config.SETTINGS[variable]
+# sorting settings according to plugin
+callbacks = []
+settings_rev = {}
+for entry in config.SETTINGS.keys():
+ callback, params = config.SETTINGS[entry]
+ callbacks.append(callback)
+ settings_rev[callback] = (entry, params)
+callbacks.sort()
+
+# generating man in correct order
+for callback in callbacks:
+ variable, params = settings_rev[callback]
func = msec.get_action(callback)
if func:
print function_str % (callback, func.__doc__.strip(), variable, ", ".join(params))