Univention Bugzilla – Attachment 10022 Details for
Bug 49447
Broken state of ReconnectLDAPObject instance after exceptions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Reproduce broken reconnect ldapobject
broken_reconnect_ldapobject.py (text/x-python), 723 bytes, created by
Jürn Brodersen
on 2019-05-10 16:05:23 CEST
(
hide
)
Description:
Reproduce broken reconnect ldapobject
Filename:
MIME Type:
Creator:
Jürn Brodersen
Created:
2019-05-10 16:05:23 CEST
Size:
723 bytes
patch
obsolete
>import ldap >import subprocess > >bind_dn = 'uid=Administrator,cn=users,dc=univention,dc=intranet' >bind_pw = 'univention' >ldap_addr = 'ldap://localhost:7389' > > >lo = ldap.ldapobject.ReconnectLDAPObject(ldap_addr, retry_max=2, retry_delay=1) >lo.bind_s(bind_dn, bind_pw) >subprocess.check_call(['systemctl', 'stop', 'slapd']) >try: > _ = lo.search_s('dc=univention,dc=intranet', ldap.SCOPE_SUBTREE, '(uid=Administrator)') >except ldap.LDAPError as exc: > print('Exception raised as expected') > print(exc) >finally: > subprocess.check_call(['systemctl', 'start', 'slapd']) >print('\n######################') >print('Unexpected exception') >_ = lo.search_s('dc=univention,dc=intranet', ldap.SCOPE_SUBTREE, '(uid=Administrator)')
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 49447
: 10022