Skip to content

Commit

Permalink
guard as headers is Optional
Browse files Browse the repository at this point in the history
Signed-off-by: tarilabs <matteo.mortari@gmail.com>
  • Loading branch information
tarilabs committed Jul 6, 2024
1 parent 1e891d2 commit c243eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oras/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ def do_request(
:type stream: bool
"""
# Make the request and return to calling function, but attempt to use auth token if previously obtained
if isinstance(self.auth, oras.auth.TokenAuth):
if headers is not None and isinstance(self.auth, oras.auth.TokenAuth):
headers.update(self.auth.get_auth_header())
response = self.session.request(
method,
Expand Down

0 comments on commit c243eb2

Please sign in to comment.