Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from lsst/tickets/DM-11653
Browse files Browse the repository at this point in the history
Remove call to __del__
  • Loading branch information
mfisherlevine committed Oct 3, 2017
2 parents ee9ed86 + 30573c6 commit be69b68
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/lsst/ci/ctio0m9/validate.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import absolute_import, division, print_function

import atexit
import sys
import traceback

Expand All @@ -14,14 +15,14 @@ class TestTask(CmdLineTask):
ConfigClass = Config # Nothing to configure!

def __init__(self, *args, **kwargs):
super(TestTask, self).__init__(*args, **kwargs)
CmdLineTask.__init__(self, *args, **kwargs)
self._failures = 0
atexit.register(self.finalise)

def __del__(self):
def finalise(self):
if self._failures > 0:
self.log.fatal("%d tests failed")
sys.exit(1)
CmdLineTask.__del__(self)

@classmethod
def _makeArgumentParser(cls):
Expand Down

0 comments on commit be69b68

Please sign in to comment.