Skip to content

Commit

Permalink
Check for errors correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshnoronha committed Apr 11, 2024
1 parent ad53ca3 commit 3cf2005
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lynkctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def upload(self, sbom_file):
resp_json = response.json()
errors = resp_json.get('data', {}).get(
'sbomUpload', {}).get('errors')
if errors is not None and errors != '[]':
if errors:
print(f"Error uploading sbom: {errors}")
return 1
print('Uploaded successfully')
Expand Down

0 comments on commit 3cf2005

Please sign in to comment.