Skip to content

Commit a8830ef

Browse files
author
stroeder
committed
ldap.resiter: PEP-8 and a small fix
1 parent c2d4a63 commit a8830ef

File tree

1 file changed

+31
-14
lines changed

1 file changed

+31
-14
lines changed

Lib/ldap/resiter.py

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,38 @@
44
See https://www.python-ldap.org/ for details.
55
"""
66

7+
from ldap.pkginfo import __version__, __author__, __license__
78

8-
class ResultProcessor:
9-
"""
10-
Mix-in class used with ldap.ldapopbject.LDAPObject or derived classes.
11-
"""
129

13-
def allresults(self,msgid,timeout=-1,add_ctrls=0):
10+
class ResultProcessor:
1411
"""
15-
Generator function which returns an iterator for processing all LDAP operation
16-
results of the given msgid retrieved with LDAPObject.result3() -> 4-tuple
12+
Mix-in class used with ldap.ldapopbject.LDAPObject or derived classes.
1713
"""
18-
result_type,result_list,result_msgid,result_serverctrls,_,_ = self.result4(msgid,0,timeout,add_ctrls=add_ctrls)
19-
while result_type and result_list:
20-
# Loop over list of search results
21-
for result_item in result_list:
22-
yield (result_type,result_list,result_msgid,result_serverctrls)
23-
result_type,result_list,result_msgid,result_serverctrls,_,_ = self.result4(msgid,0,timeout,add_ctrls=add_ctrls)
24-
return # allresults()
14+
15+
def allresults(self, msgid, timeout=-1, add_ctrls=0):
16+
"""
17+
Generator function which returns an iterator for processing all LDAP operation
18+
results of the given msgid like retrieved with LDAPObject.result3() -> 4-tuple
19+
"""
20+
result_type, result_list, result_msgid, result_serverctrls, _, _ = \
21+
self.result4(
22+
msgid,
23+
0,
24+
timeout,
25+
add_ctrls=add_ctrls
26+
)
27+
while result_type and result_list:
28+
yield (
29+
result_type,
30+
result_list,
31+
result_msgid,
32+
result_serverctrls
33+
)
34+
result_type, result_list, result_msgid, result_serverctrls, _, _ = \
35+
self.result4(
36+
msgid,
37+
0,
38+
timeout,
39+
add_ctrls=add_ctrls
40+
)
41+
return # allresults()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy