[signals] update FLAGS handling

This commit is contained in:
Mike Fährmann
2025-07-11 21:01:24 +02:00
parent 2d3b6155eb
commit d8a370da0b
3 changed files with 22 additions and 9 deletions

View File

@@ -728,8 +728,15 @@ class Flags():
self.FILE = self.POST = self.CHILD = self.DOWNLOAD = None
def process(self, flag):
if flag == "terminate":
value = self.__dict__[flag]
self.__dict__[flag] = None
if value == "abort":
raise exception.AbortExtraction()
if value == "terminate":
raise exception.TerminateExtraction()
if value == "restart":
raise exception.RestartExtraction()
raise exception.StopExtraction()