Skip to content

Commit

Permalink
Merge pull request #20 from interlynk-io/fix/file-upload
Browse files Browse the repository at this point in the history
Check for errors correctly
  • Loading branch information
riteshnoronha authored Apr 12, 2024
2 parents ad53ca3 + 3cf2005 commit c159b90
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 c159b90

Please sign in to comment.