From 55bb0ccbb79189475d734635087d4de56c44babd Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 25 Feb 2008 15:01:56 -0500 Subject: Update mailmanctl for the new master.py script. Fortunately, we can simplify this considerably, since it now just checks the permissions, handles command parsing, and then just (in the child) execs master.py. master.py handles the log files, etc. Added 'BIN_DIR' to the configuration object. Remove references to instance.cfg in the comments; that was never implemented. I still need tests for both mailmanctl and master. --- Mailman/configuration.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'Mailman/configuration.py') diff --git a/Mailman/configuration.py b/Mailman/configuration.py index 7206ec344..1efb08386 100644 --- a/Mailman/configuration.py +++ b/Mailman/configuration.py @@ -72,16 +72,12 @@ class Configuration(object): for name in DEFAULT_QRUNNERS: self.add_qrunner(name) # Load the configuration from the named file, or if not given, search - # in the runtime data directory for an etc/mailman.cfg file. If there - # is an instance.cfg file in the same directory, load that first, then - # mailman.cfg. - # - # Whatever you find, create a namespace and execfile that file in it. - # The values in that namespace are exposed as attributes on this - # Configuration instance. + # around for a mailman.cfg file. Whatever you find, create a + # namespace and execfile that file in it. The values in that + # namespace are exposed as attributes on this Configuration instance. self.filename = None - bin_dir = os.path.dirname(sys.argv[0]) - dev_dir = join(os.path.dirname(bin_dir)) + self.BIN_DIR = os.path.abspath(os.path.dirname(sys.argv[0])) + dev_dir = os.path.dirname(self.BIN_DIR) paths = [ # Development directories. join(dev_dir, 'var', 'etc', 'mailman.cfg'), @@ -99,7 +95,7 @@ class Configuration(object): execfile(path, ns, ns) except EnvironmentError, e: if e.errno <> errno.ENOENT: - # It's okay if the instance.cfg file does not exist. This + # It's okay if the mailman.cfg file does not exist. This # can happen for example in the test suite. raise else: -- cgit v1.2.3-70-g09d2