All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [yocto][meta-spdxscanner][PATCH V2] Remove redundant code.
  2020-04-02 16:45 [yocto][meta-spdxscanner][PATCH V2] Remove redundant code Li, Xiaoming
@ 2020-04-02 16:10 ` Joshua Watt
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Watt @ 2020-04-02 16:10 UTC (permalink / raw)
  To: Li, Xiaoming, yocto; +Cc: leimaohui

[-- Attachment #1: Type: text/plain, Size: 989 bytes --]


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@cn.fujitsu.com>
> ---
>   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)
>
> 

[-- Attachment #2: Type: text/html, Size: 1691 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [yocto][meta-spdxscanner][PATCH V2] Remove redundant code.
@ 2020-04-02 16:45 Li, Xiaoming
  2020-04-02 16:10 ` Joshua Watt
  0 siblings, 1 reply; 2+ messages in thread
From: Li, Xiaoming @ 2020-04-02 16:45 UTC (permalink / raw)
  To: yocto; +Cc: leimaohui

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@cn.fujitsu.com>
---
 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)
 
     bb.note("Folder Id =  " + str(folder_id))
     return str(folder_id)
-- 
2.17.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-02 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 16:45 [yocto][meta-spdxscanner][PATCH V2] Remove redundant code Li, Xiaoming
2020-04-02 16:10 ` Joshua Watt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.