summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mailman/config/config.py2
-rw-r--r--src/mailman/core/docs/runner.rst4
-rw-r--r--src/mailman/interfaces/domain.py5
-rw-r--r--src/mailman/model/domain.py3
-rw-r--r--src/mailman/testing/testing.cfg2
5 files changed, 12 insertions, 4 deletions
diff --git a/src/mailman/config/config.py b/src/mailman/config/config.py
index 52cac414f..649d6c5e1 100644
--- a/src/mailman/config/config.py
+++ b/src/mailman/config/config.py
@@ -141,7 +141,7 @@ class Configuration:
def _expand_paths(self):
"""Expand all configuration paths."""
# Set up directories.
- bin_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
+ bin_dir = os.path.abspath(os.path.dirname(sys.executable))
# Now that we've loaded all the configuration files we're going to
# load, set up some useful directories based on the settings in the
# configuration file.
diff --git a/src/mailman/core/docs/runner.rst b/src/mailman/core/docs/runner.rst
index 28eab9203..e9fd21c57 100644
--- a/src/mailman/core/docs/runner.rst
+++ b/src/mailman/core/docs/runner.rst
@@ -73,3 +73,7 @@ on instance variables.
version : 3
XXX More of the Runner API should be tested.
+
+..
+ Clean up.
+ >>> config.pop('test-runner')
diff --git a/src/mailman/interfaces/domain.py b/src/mailman/interfaces/domain.py
index e7cb0d901..d51b1a702 100644
--- a/src/mailman/interfaces/domain.py
+++ b/src/mailman/interfaces/domain.py
@@ -97,7 +97,10 @@ class IDomain(Interface):
E.g. postmaster@example.com""")
mailing_lists = Attribute(
- 'All mailing lists for this domain.')
+ """All mailing lists for this domain.
+
+ The mailing lists are returned in order sorted by list-id.
+ """)
def confirm_url(token=''):
"""The url used for various forms of confirmation.
diff --git a/src/mailman/model/domain.py b/src/mailman/model/domain.py
index ef8b1f761..8290cb755 100644
--- a/src/mailman/model/domain.py
+++ b/src/mailman/model/domain.py
@@ -95,7 +95,8 @@ class Domain(Model):
def mailing_lists(self, store):
"""See `IDomain`."""
mailing_lists = store.query(MailingList).filter(
- MailingList.mail_host == self.mail_host)
+ MailingList.mail_host == self.mail_host
+ ).order_by(MailingList._list_id)
for mlist in mailing_lists:
yield mlist
diff --git a/src/mailman/testing/testing.cfg b/src/mailman/testing/testing.cfg
index ff2034069..12646c680 100644
--- a/src/mailman/testing/testing.cfg
+++ b/src/mailman/testing/testing.cfg
@@ -20,7 +20,7 @@
# For testing against PostgreSQL.
[database]
class: mailman.database.postgresql.PostgreSQLDatabase
-url: postgresql://barry:barry@localhost:5433/mailman
+url: postgresql://barry:barry@localhost:5432/mailman
[mailman]
site_owner: noreply@example.com