def __init__(self, *args, **kwargs): SmartDL.__init__(self, *args, **kwargs) # we register the stop() method of SmartDL to be called when the program exits # it makes sure any downloading threads are safely terminated import atexit atexit.register(self.stop)
def isFinished(self): # the default method now needs to also report whether it was killed or not return not self._killed and SmartDL.isFinished(self)