diff options
| author | Barry Warsaw | 2009-05-03 15:35:29 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-05-03 15:35:29 -0400 |
| commit | e920c98c72fc9674316ae32c26a81fe571964ea5 (patch) | |
| tree | 905de48fe2f08c939b77e13f0fcf35ad1b6e8efa /src/mailman/bin/qrunner.py | |
| parent | 443aba66658347d0b747ff84ec1750cfb8c71924 (diff) | |
| download | mailman-e920c98c72fc9674316ae32c26a81fe571964ea5.tar.gz mailman-e920c98c72fc9674316ae32c26a81fe571964ea5.tar.zst mailman-e920c98c72fc9674316ae32c26a81fe571964ea5.zip | |
Diffstat (limited to 'src/mailman/bin/qrunner.py')
| -rw-r--r-- | src/mailman/bin/qrunner.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mailman/bin/qrunner.py b/src/mailman/bin/qrunner.py index 62e943aad..0016d082b 100644 --- a/src/mailman/bin/qrunner.py +++ b/src/mailman/bin/qrunner.py @@ -202,12 +202,16 @@ def main(): options.initialize() if options.options.list: - prefixlen = max(len(shortname) - for shortname in config.qrunner_shortcuts) - for shortname in sorted(config.qrunner_shortcuts): - runnername = config.qrunner_shortcuts[shortname] - shortname = (' ' * (prefixlen - len(shortname))) + shortname - print _('$shortname runs $runnername') + descriptions = {} + for section in config.qrunner_configs: + shortname = section.name.rsplit('.', 1)[-1] + classname = getattr(section, 'class').rsplit('.', 1)[-1] + descriptions[shortname] = classname + longest = max(len(name) for name in descriptions) + for shortname in sorted(descriptions): + classname = descriptions[shortname] + name = (' ' * (longest - len(shortname))) + shortname + print _('$name runs $classname') sys.exit(0) # Fast track for one infinite runner |
