summaryrefslogtreecommitdiff
path: root/src/mailman/bin/mailman.py
diff options
context:
space:
mode:
authorBarry Warsaw2012-07-25 17:48:47 -0400
committerBarry Warsaw2012-07-25 17:48:47 -0400
commitc15688eb88db81340a7602093134e10e8927b2fc (patch)
tree11fc83bf64a436fd39492441e3383a109b02d867 /src/mailman/bin/mailman.py
parent3ecb13338d36f7f4bccb609bdb2d54ff11359f8f (diff)
downloadmailman-c15688eb88db81340a7602093134e10e8927b2fc.tar.gz
mailman-c15688eb88db81340a7602093134e10e8927b2fc.tar.zst
mailman-c15688eb88db81340a7602093134e10e8927b2fc.zip
Diffstat (limited to 'src/mailman/bin/mailman.py')
-rw-r--r--src/mailman/bin/mailman.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mailman/bin/mailman.py b/src/mailman/bin/mailman.py
index 94de65255..6b15c9838 100644
--- a/src/mailman/bin/mailman.py
+++ b/src/mailman/bin/mailman.py
@@ -90,13 +90,9 @@ def main():
# No arguments or subcommands were given.
parser.print_help()
parser.exit()
- # Before actually performing the subcommand, we need to initialize the
- # Mailman system, and in particular, we must read the configuration file.
- config_file = os.getenv('MAILMAN_CONFIG_FILE')
- if config_file is None:
- if args.config is not None:
- config_file = os.path.abspath(os.path.expanduser(args.config))
-
- initialize(config_file)
+ # Initialize the system. Honor the -C flag if given.
+ config_path = (None if args.config is None
+ else os.path.abspath(os.path.expanduser(args.config)))
+ initialize(config_path)
# Perform the subcommand option.
args.func(args)