bitbake: fetch2: Cleanup file checksum generation
authorJacob Kroon <jacob.kroon@mikrodidakt.se>
Sat, 26 Apr 2014 14:32:18 +0000 (16:32 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 27 Apr 2014 00:27:55 +0000 (01:27 +0100)
Cleanup the fix done in f9416e76e272ba3249abff099f6f3a47fe82e03e.

Instead of adding continue statements we can just move the last
statements into the final else-clause.

(Bitbake rev: 6dfb33fd7204e09815bde7ba5bf21941a73fe965)

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/fetch2/__init__.py

index 5a03a0e..bc4e8fd 100644 (file)
@@ -985,15 +985,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