All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch2:init check if path is none before calculating checksums
@ 2023-07-21 23:49 belouargamohamed
  2023-07-24 13:43 ` [bitbake-devel] " Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: belouargamohamed @ 2023-07-21 23:49 UTC (permalink / raw)
  To: bitbake-devel; +Cc: BELOUARGA Mohamed

From: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>

Add one more verification that checks if localpath is None, because
we can't compute checksum of a None.

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
---
 lib/bb/fetch2/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 770021de16..f6e5d19627 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -1402,6 +1402,9 @@ class FetchMethod(object):
         Is localpath something that can be represented by a checksum?
         """
 
+        # We cannot compute checksums for None
+        if urldata.localpath is None:
+            return False
         # We cannot compute checksums for directories
         if os.path.isdir(urldata.localpath):
             return False
-- 
2.25.1



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

end of thread, other threads:[~2023-07-25  9:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-21 23:49 [PATCH] fetch2:init check if path is none before calculating checksums belouargamohamed
2023-07-24 13:43 ` [bitbake-devel] " Richard Purdie
2023-07-24 17:50   ` Frédéric Martinsons
2023-07-25  9:30     ` belouargamohamed

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.