Skip to content

Commit 2647f59

Browse files
authored
Removed some python2-only code from SlapdObject
python-ldap#391
1 parent 3484d57 commit 2647f59

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Lib/slapdtest/_slapdtest.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -461,15 +461,7 @@ def stop(self):
461461
self._proc.terminate()
462462
self.wait()
463463
self._cleanup_rundir()
464-
if hasattr(atexit, 'unregister'):
465-
# Python 3
466-
atexit.unregister(self.stop)
467-
elif hasattr(atexit, '_exithandlers'):
468-
# Python 2, can be None during process shutdown
469-
try:
470-
atexit._exithandlers.remove(self.stop)
471-
except ValueError:
472-
pass
464+
atexit.unregister(self.stop)
473465

474466
def restart(self):
475467
"""

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