summaryrefslogtreecommitdiffstats
path: root/bitbake/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:48:26 +0100
commit058a44165ce375f405063e73a9fcd1b2757ef8da (patch)
treedf8617492d16d766d404a473317ee51736cb2d0b /bitbake/lib/bb/fetch2/__init__.py
parent1f92db2d2cadf623f8799d7c58495a6158d3d405 (diff)
downloadpoky-058a44165ce375f405063e73a9fcd1b2757ef8da.tar.gz
bitbake: 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. (Bitbake rev: 47ab9d21171a834cbac3d1ce368d59fd71d14452) 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 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 8afe012efb..2428a26fa6 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1402,6 +1402,9 @@ class FetchMethod(object):
1402 Is localpath something that can be represented by a checksum? 1402 Is localpath something that can be represented by a checksum?
1403 """ 1403 """
1404 1404
1405 # We cannot compute checksums for None
1406 if urldata.localpath is None:
1407 return False
1405 # We cannot compute checksums for directories 1408 # We cannot compute checksums for directories
1406 if os.path.isdir(urldata.localpath): 1409 if os.path.isdir(urldata.localpath):
1407 return False 1410 return False