From 3cf2005416ce67a690e95d5e56e9a99c0405ce3b Mon Sep 17 00:00:00 2001 From: "ritesh.noronha" Date: Thu, 11 Apr 2024 15:43:41 -0700 Subject: [PATCH] Check for errors correctly --- lynkctx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lynkctx.py b/lynkctx.py index 559695a..e8d00c2 100644 --- a/lynkctx.py +++ b/lynkctx.py @@ -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')