X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=bin%2Flists.rpc.py;h=6411b8862d6d01f68928ac49bb0d1e3eaf58813c;hb=5b48ebf46ef939d701852d2117bbcf308036027c;hp=1287e5be9c013e21374975dd553bf02e4b79c853;hpb=3e3d853e45f3b9471fb1840eeb30652646fef1ba;p=platal.git diff --git a/bin/lists.rpc.py b/bin/lists.rpc.py index 1287e5b..6411b88 100755 --- a/bin/lists.rpc.py +++ b/bin/lists.rpc.py @@ -1,6 +1,6 @@ #!/usr/bin/env python #*************************************************************************** -#* Copyright (C) 2003-2010 Polytechnique.org * +#* Copyright (C) 2003-2011 Polytechnique.org * #* http://opensource.polytechnique.org/ * #* * #* This program is free software; you can redistribute it and/or modify * @@ -298,7 +298,7 @@ def get_list_info(userdesc, perms, mlist, front_page=0): if not is_member and (mlist.subscribe_policy > 1): is_pending = list_call_locked(is_subscription_pending, userdesc, perms, mlist, False) if is_pending is 0: - return 0 + return None host = mlist.internal_name().split(VHOST_SEP)[0].lower() details = { @@ -414,7 +414,11 @@ def get_members(userdesc, perms, mlist): """ List the members of a list. @mlist """ - details, members = get_list_info(userdesc, perms, mlist) + infos = get_list_info(userdesc, perms, mlist) + if infos is None: + # Do not return None, this is not serializable + return 0 + details, members = infos members.sort() members = map(lambda member: (get_name(member), member), members) return (details, members, mlist.owner)