aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorBELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>2023-07-22 01:49:07 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-04 11:47:59 +0100
commit47ab9d21171a834cbac3d1ce368d59fd71d14452 (patch)
tree4db4c3c187a1a7a192acd2903116d89e2dfb94b0 /lib/bb/fetch2/__init__.py
parent48a102e49448656ef25fb689af7b0971fde523e3 (diff)
downloadbitbake-47ab9d21171a834cbac3d1ce368d59fd71d14452.tar.gz
fetch2: Check if path is 'None' before calculating checksums
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> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r--lib/bb/fetch2/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 8afe012ef..2428a26fa 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