refactor: remove dead code paths on task exception

As the tasks with fail=True property return via an exception for a
long time, the handling of the return code is not required anymore.
This simplifies the code by removing dead code paths.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Felix Moessbauer 2023-05-18 09:15:07 +02:00 committed by Jan Kiszka
parent ecd670e9ae
commit d3963ff494

View File

@ -226,8 +226,6 @@ class RepoImpl(Repo):
(retc, _) = await run_cmd_async( (retc, _) = await run_cmd_async(
self.clone_cmd(tmpdir, createref=True), self.clone_cmd(tmpdir, createref=True),
cwd=get_context().kas_work_dir) cwd=get_context().kas_work_dir)
if retc != 0:
return retc
logging.debug('Created repo ref for %s', self.qualified_name) logging.debug('Created repo ref for %s', self.qualified_name)
try: try:
@ -244,8 +242,8 @@ class RepoImpl(Repo):
(retc, _) = await run_cmd_async( (retc, _) = await run_cmd_async(
self.clone_cmd(sdir, createref=False), self.clone_cmd(sdir, createref=False),
cwd=get_context().kas_work_dir) cwd=get_context().kas_work_dir)
if retc == 0:
logging.info('Repository %s cloned', self.name) logging.info('Repository %s cloned', self.name)
# Make sure the remote origin is set to the value # Make sure the remote origin is set to the value
# in the kas file to avoid surprises # in the kas file to avoid surprises
@ -254,8 +252,6 @@ class RepoImpl(Repo):
self.set_remote_url_cmd(), self.set_remote_url_cmd(),
cwd=self.path, cwd=self.path,
liveupdate=False) liveupdate=False)
if retc != 0:
return retc
except NotImplementedError: except NotImplementedError:
logging.warning('Repo implementation does not support changing ' logging.warning('Repo implementation does not support changing '
'the remote url.') 'the remote url.')
@ -322,8 +318,6 @@ class RepoImpl(Repo):
(retc, _) = await run_cmd_async(self.prepare_patches_cmd(), (retc, _) = await run_cmd_async(self.prepare_patches_cmd(),
cwd=self.path) cwd=self.path)
if retc:
return retc
my_patches = [] my_patches = []