Add new features
This commit is contained in:
@@ -404,6 +404,10 @@ class ReadTrackTask(task.Task):
|
||||
self.stop()
|
||||
return
|
||||
|
||||
def abort(self):
|
||||
if getattr(self, "_popen", None) is not None and self._popen.poll() is None:
|
||||
self._popen.terminate()
|
||||
|
||||
|
||||
class ReadVerifyTrackTask(task.MultiSeparateTask):
|
||||
"""
|
||||
@@ -566,6 +570,15 @@ class ReadVerifyTrackTask(task.MultiSeparateTask):
|
||||
|
||||
task.MultiSeparateTask.stop(self)
|
||||
|
||||
def abort(self):
|
||||
if 0 < self._task <= len(self.tasks):
|
||||
current_task = self.tasks[self._task - 1]
|
||||
abort = getattr(current_task, "abort", None)
|
||||
if callable(abort):
|
||||
abort()
|
||||
else:
|
||||
current_task.stop()
|
||||
|
||||
|
||||
_VERSION_RE = re.compile(
|
||||
"^cdparanoia (?P<version>.+) release (?P<release>.+)")
|
||||
|
||||
Reference in New Issue
Block a user