summaryrefslogtreecommitdiff
path: root/src/mailman/bin/mailman.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman/bin/mailman.py')
-rw-r--r--src/mailman/bin/mailman.py12
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)