Skip to content

Commit

Permalink
Handle more auth responses
Browse files Browse the repository at this point in the history
  • Loading branch information
scanon committed Mar 11, 2022
1 parent d7fd323 commit d6a1876
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imagegw/shifter_imagegw/dockerv2_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def _inspect(self):
stdout, stderr = process.communicate()
stderr_str = stderr.decode("utf-8")
auth_errors = ['authentication', 'forbidden', 'unauthorized']
# see if we got some type of unauthorized response
if not any(a_err in stderr_str.lower() for a_err in auth_errors):
# See if it exited with an error
if process.returncode:
raise OSError("Skopeo inspect failed: %s" % (stderr_str))
return json.loads(stdout.decode("utf-8"))

Expand Down

0 comments on commit d6a1876

Please sign in to comment.