Skip to content

Commit

Permalink
Removed some python2-only code from SlapdObject
Browse files Browse the repository at this point in the history
  • Loading branch information
Éloi Rivard authored and GitHub committed Nov 13, 2020
1 parent 3484d57 commit 2647f59
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions Lib/slapdtest/_slapdtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,7 @@ def stop(self):
self._proc.terminate()
self.wait()
self._cleanup_rundir()
if hasattr(atexit, 'unregister'):
# Python 3
atexit.unregister(self.stop)
elif hasattr(atexit, '_exithandlers'):
# Python 2, can be None during process shutdown
try:
atexit._exithandlers.remove(self.stop)
except ValueError:
pass
atexit.unregister(self.stop)

def restart(self):
"""
Expand Down

0 comments on commit 2647f59

Please sign in to comment.