Less but better output
This commit is contained in:
		| @@ -16,7 +16,7 @@ class MyLDAPObject(ldap.ldapobject.LDAPObject,ldap.resiter.ResultProcessor): | ||||
|   pass | ||||
|  | ||||
|  | ||||
| l = MyLDAPObject(uri,trace_level=2) | ||||
| l = MyLDAPObject(uri,trace_level=0) | ||||
| l.simple_bind_s('uid=diradm,dc=example,dc=com','testsecret') | ||||
|  | ||||
| dc = DereferenceControl( | ||||
| @@ -30,8 +30,9 @@ dc = DereferenceControl( | ||||
|     ], | ||||
|   } | ||||
| ) | ||||
|  | ||||
| print 'pyasn1 output of request control:' | ||||
| print dc._derefSpecs().prettyPrint() | ||||
| dc.encodeControlValue() | ||||
|  | ||||
| msg_id = l.search_ext( | ||||
|   'dc=example,dc=com', | ||||
| @@ -45,3 +46,5 @@ 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'] | ||||
|     if deref_control: | ||||
|       pprint.pprint(deref_control[0].derefRes) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stroeder
					stroeder