summaryrefslogtreecommitdiffstats
path: root/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@mikrodidakt.se>2014-04-28 19:14:56 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-29 17:33:51 +0100
commit9ee19a3ca2f8e11a91f0289ea3486310c61d40f2 (patch)
treed20f9d0242948da9b4e1e7075f2ef2953c219831 /lib/bb/fetch2/__init__.py
parentdfa041c940caad12da50126a559afc8de089eeda (diff)
downloadbitbake-9ee19a3ca2f8e11a91f0289ea3486310c61d40f2.tar.gz
fetch2: Cleanup file checksum generation, v2
The initial version of this patch was reverted in 0a94e568152de550dedc8135a766beb18bf064ab However, it was later agreed upon that it was reverted due to a misunderstanding during code review; the patch is ok. This version of the patch also removes an unneeded initialization of the 'checksum' variable outside the scopes it is being used in. Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/__init__.py')
-rw-r--r--lib/bb/fetch2/__init__.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 5a03a0e46..5a9c72f01 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -975,7 +975,6 @@ def get_file_checksums(filelist, pn):
checksums = []
for pth in filelist.split():
- checksum = None
if '*' in pth:
# Handle globs
for f in glob.glob(pth):
@@ -985,15 +984,12 @@ def get_file_checksums(filelist, pn):
checksum = checksum_file(f)
if checksum:
checksums.append((f, checksum))
- continue
elif os.path.isdir(pth):
checksums.extend(checksum_dir(pth))
- continue
else:
checksum = checksum_file(pth)
-
- if checksum:
- checksums.append((pth, checksum))
+ if checksum:
+ checksums.append((pth, checksum))
checksums.sort(key=operator.itemgetter(1))
return checksums