[Py3] Fix derefcontrol for Python3.
This fixes invalid calls of print in commit
3a84c23bec
This commit is contained in:
parent
05c1e5b0df
commit
54193cd7df
|
@ -5,6 +5,7 @@ This sample script demonstrates the use of the dereference control
|
|||
|
||||
Requires module pyasn1 (see http://pyasn1.sourceforge.net/)
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
import pprint,ldap,ldap.modlist,ldap.resiter
|
||||
|
||||
|
@ -31,8 +32,8 @@ dc = DereferenceControl(
|
|||
}
|
||||
)
|
||||
|
||||
print 'pyasn1 output of request control:'
|
||||
print dc._derefSpecs().prettyPrint()
|
||||
print('pyasn1 output of request control:')
|
||||
print(dc._derefSpecs().prettyPrint())
|
||||
|
||||
msg_id = l.search_ext(
|
||||
'dc=demo1,dc=freeipa,dc=org',
|
||||
|
@ -45,6 +46,6 @@ msg_id = l.search_ext(
|
|||
for res_type,res_data,res_msgid,res_controls in l.allresults(msg_id,add_ctrls=1):
|
||||
for dn,entry,deref_control in res_data:
|
||||
# process dn and entry
|
||||
print dn,entry['objectClass']
|
||||
print(dn,entry['objectClass'])
|
||||
if deref_control:
|
||||
pprint.pprint(deref_control[0].derefRes)
|
||||
|
|
Loading…
Reference in New Issue