diff options
| author | Barry Warsaw | 2010-01-27 12:11:56 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2010-01-27 12:11:56 -0500 |
| commit | ddb2108e49a5a2d2142c275cf41623b85879b1b5 (patch) | |
| tree | ec7f3d161a2e2d201a2805a12972d7fb6a499f8b /src/mailman/commands/cli_info.py | |
| parent | 7519bcceef271e04aea0237f58cd1e0787a5dce1 (diff) | |
| download | mailman-ddb2108e49a5a2d2142c275cf41623b85879b1b5.tar.gz mailman-ddb2108e49a5a2d2142c275cf41623b85879b1b5.tar.zst mailman-ddb2108e49a5a2d2142c275cf41623b85879b1b5.zip | |
Diffstat (limited to 'src/mailman/commands/cli_info.py')
| -rw-r--r-- | src/mailman/commands/cli_info.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mailman/commands/cli_info.py b/src/mailman/commands/cli_info.py index b3ca02718..98a025673 100644 --- a/src/mailman/commands/cli_info.py +++ b/src/mailman/commands/cli_info.py @@ -50,6 +50,11 @@ class Info: action='store', help=_("""\ File to send the output to. If not given, standard output is used.""")) + command_parser.add_argument( + '-p', '--paths', + action='store_true', help=_("""\ + A more verbose output including the file system paths that Mailman + is using.""")) def process(self, args): """See `ICLISubCommand`.""" @@ -59,8 +64,18 @@ class Info: # We don't need to close output because that will happen # automatically when the script exits. output = open(args.output, 'w') - print >> output, MAILMAN_VERSION_FULL print >> output, 'Python', sys.version print >> output, 'config file:', config.filename print >> output, 'db url:', config.db.url + if args.paths: + print >> output, 'File system paths:' + longest = 0 + paths = {} + for attribute in dir(config): + if attribute.endswith('_DIR') or attribute.endswith('_FILE'): + paths[attribute] = getattr(config, attribute) + longest = max(longest, len(attribute)) + for attribute in sorted(paths): + print ' {0:{2}} = {1}'.format(attribute, paths[attribute], + longest) |
