Skip to content

Commit c159b90

Browse files
Merge pull request #20 from interlynk-io/fix/file-upload
Check for errors correctly
2 parents ad53ca3 + 3cf2005 commit c159b90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lynkctx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def upload(self, sbom_file):
297297
resp_json = response.json()
298298
errors = resp_json.get('data', {}).get(
299299
'sbomUpload', {}).get('errors')
300-
if errors is not None and errors != '[]':
300+
if errors:
301301
print(f"Error uploading sbom: {errors}")
302302
return 1
303303
print('Uploaded successfully')

0 commit comments

Comments
 (0)