------------------------------------------------------------
revno: 19
fixes bug: https://launchpad.net/bugs/802971
committer: Florian Fuchs <[email protected]>
branch nick: mailman.client
timestamp: Thu 2011-10-27 18:18:28 +0200
message:
- Added `lists` property to _Domain class to retrive all lists for a specific
domain
modified:
mailman/client/_client.py
mailman/client/docs/using.txt
--
lp:mailman.client
https://code.launchpad.net/~mailman-coders/mailman.client/trunk
Your team Mailman Coders is subscribed to branch lp:mailman.client.
To unsubscribe from this branch go to
https://code.launchpad.net/~mailman-coders/mailman.client/trunk/+edit-subscription
=== modified file 'mailman/client/_client.py'
--- mailman/client/_client.py 2011-10-27 10:57:00 +0000
+++ mailman/client/_client.py 2011-10-27 16:18:28 +0000
@@ -247,6 +247,16 @@
self._get_info()
return self._info['url_host']
+ @property
+ def lists(self):
+ response, content = self._connection.call(
+ 'domains/{0}/lists'.format(self.mail_host))
+ if 'entries' not in content:
+ return []
+ return [_List(self._connection, entry['self_link'])
+ for entry in sorted (content['entries'],
+ key=itemgetter('fqdn_listname'))]
+
def create_list(self, list_name):
fqdn_listname = '{0}@{1}'.format(list_name, self.mail_host)
response, content = self._connection.call(
=== modified file 'mailman/client/docs/using.txt'
--- mailman/client/docs/using.txt 2011-10-27 10:57:00 +0000
+++ mailman/client/docs/using.txt 2011-10-27 16:18:28 +0000
@@ -134,6 +134,14 @@
<List "[email protected]">
<List "[email protected]">
<List "[email protected]">
+
+If you only want to know all lists for a specific domain, use the domain object.
+
+ >>> for mlist in example.lists:
+ ... print mlist
+ <List "[email protected]">
+ <List "[email protected]">
+ <List "[email protected]">
You can use a list instance to delete the list.
_______________________________________________
Mailman-coders mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-coders