Re: [meta-spdxscanner][PATCH V2] Remove redundant code.


Joshua Watt
 


On 4/2/20 11:45 AM, Li, Xiaoming wrote:
FOLDER_ID has already been assigned a defalut value "1", so there is no
need add 'or "1"' here.

Signed-off-by: Li Xiaoming <lixm.fnst@...>
---
 classes/fossology-rest.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/classes/fossology-rest.bbclass b/classes/fossology-rest.bbclass
index 5c5ef70..69f4998 100644
--- a/classes/fossology-rest.bbclass
+++ b/classes/fossology-rest.bbclass
@@ -230,7 +230,7 @@ def get_folder_id(d):
         folder_name = d.getVar('FOLDER_NAME')
         folder_id = create_folder(d, folder_name)
     else:
-        folder_id = (d.getVar('FOLDER_ID', True) or "1")
+        folder_id = d.getVar('FOLDER_ID', False)

You probably shouldn't be disabling variable expansion here (i.e. passing False as the second argument)?

 
     bb.note("Folder Id =  " + str(folder_id))
     return str(folder_id)


    

Join yocto@lists.yoctoproject.org to automatically receive all group messages.