Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/pynslcd/alias.py
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-01-29 15:39:25 +0100
committerArthur de Jong <arthur@arthurdejong.org>2012-01-29 15:39:25 +0100
commitfcce277a6e8d56036f6a33bda67aa8dcc03be142 (patch)
tree0c8244da8d000d8a0029f76618e98a48a5bb976f /pynslcd/alias.py
parent0a8ff1c61c193b17b04adb0c3ced239846be855d (diff)
split the result handling into a convert() and write() step
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1613 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'pynslcd/alias.py')
-rw-r--r--pynslcd/alias.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pynslcd/alias.py b/pynslcd/alias.py
index 84dbf97..cdae9da 100644
--- a/pynslcd/alias.py
+++ b/pynslcd/alias.py
@@ -35,15 +35,15 @@ class Search(common.Search):
class AliasRequest(common.Request):
- def write(self, dn, attributes, parameters):
- # get values
+ def write(self, name, members):
+ self.fp.write_string(name)
+ self.fp.write_stringlist(members)
+
+ def convert(self, dn, attributes, parameters):
names = attributes['cn']
members = attributes['rfc822MailMember']
- # write results
for name in names:
- self.fp.write_int32(constants.NSLCD_RESULT_BEGIN)
- self.fp.write_string(name)
- self.fp.write_stringlist(members)
+ yield (name, members)
class AliasByNameRequest(AliasRequest):