diff options
| author | Andrea Crotti | 2012-03-13 04:36:21 +0000 |
|---|---|---|
| committer | Andrea Crotti | 2012-03-13 04:36:21 +0000 |
| commit | cefcce69620c123336c2e0cf87252435dc8e1f5f (patch) | |
| tree | a731236ca814cd68b3d0cb7dcf6bde4570fc4e32 /src/mailman/bin/mailman.py | |
| parent | ce02817cd4d3cf982ca58dfcb177a0b62fa75d54 (diff) | |
| download | mailman-cefcce69620c123336c2e0cf87252435dc8e1f5f.tar.gz mailman-cefcce69620c123336c2e0cf87252435dc8e1f5f.tar.zst mailman-cefcce69620c123336c2e0cf87252435dc8e1f5f.zip | |
Diffstat (limited to 'src/mailman/bin/mailman.py')
| -rw-r--r-- | src/mailman/bin/mailman.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mailman/bin/mailman.py b/src/mailman/bin/mailman.py index 2a230b49f..b9d792d4d 100644 --- a/src/mailman/bin/mailman.py +++ b/src/mailman/bin/mailman.py @@ -28,6 +28,8 @@ __all__ = [ import os import argparse +from os.path import abspath, expanduser + from zope.interface.verify import verifyObject from mailman.app.finder import find_components @@ -37,6 +39,12 @@ from mailman.interfaces.command import ICLISubCommand from mailman.version import MAILMAN_VERSION_FULL +def _absolute_path(path): + """Return the absolute after the user expansion. + """ + return abspath(expanduser(path)) + + def main(): """bin/mailman""" @@ -94,7 +102,9 @@ def main(): # Mailman system, and in particular, we must read the configuration file. config_file = os.getenv('MAILMAN_CONFIG_FILE') if config_file is None: - config_file = args.config + if args.config is not None: + config_file = _absolute_path(args.config) + initialize(config_file) # Perform the subcommand option. args.func(args) |
