Skip to content

Commit

Permalink
Remove misleading log from API response
Browse files Browse the repository at this point in the history
CLOUDDST-15929
  • Loading branch information
yashvardhannanavati committed Nov 22, 2022
1 parent 6ba014d commit 5eebc08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iib/workers/tasks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,9 @@ def run_cmd(
response: subprocess.CompletedProcess = subprocess.run(cmd, **params)

if strict and response.returncode != 0:
if set(['buildah', 'manifest', 'rm']) <= set(cmd):
if 'image not known' in response.stderr:
raise IIBError('Manifest list not found locally.')
log.error('The command "%s" failed with: %s', ' '.join(cmd), response.stderr)
regex: str
match: Optional[re.Match]
Expand All @@ -771,9 +774,6 @@ def run_cmd(
match = _regex_reverse_search(regex, response)
if match:
raise ExternalServiceError(f'{exc_msg}: {": ".join(match.groups()).strip()}')
if set(['buildah', 'manifest', 'rm']) <= set(cmd):
if 'image not known' in response.stderr:
raise IIBError('Manifest list not found locally.')

raise IIBError(exc_msg)

Expand Down

0 comments on commit 5eebc08

Please sign in to comment.