def gather_doc_group_mail_list(self, **kwargs): addrs = [] if 'doc' in kwargs: doc=kwargs['doc'] if doc.group and doc.group.features.acts_like_wg: if doc.group.list_email: addrs.append(doc.group.list_email) return addrs