]> code.ossystems Code Review - openembedded-core.git/commitdiff
spdx.bbclass: Fix undefined variable error
authorOlof Johansson <olof.johansson@axis.com>
Mon, 16 Jul 2018 15:05:54 +0000 (17:05 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Jul 2018 09:13:30 +0000 (10:13 +0100)
The path variable is used in an error message a few lines later, but was
never defined.

Signed-off-by: Olof Johansson <olofjn@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/spdx.bbclass

index ab2eaa5c0c1bc3c8c422cc69d35d7ae4e3de9f31..9e374d70a6cdd3f6ade874c31d6f915b5f96ac40 100644 (file)
@@ -289,7 +289,8 @@ def create_spdx_doc(file_info, scanned_files):
 def get_ver_code(dirname):
     chksums = []
     for f_dir, f in list_files(dirname):
-        hash = hash_file(os.path.join(dirname, f_dir, f))
+        path = os.path.join(dirname, f_dir, f)
+        hash = hash_file(path)
         if not hash is None:
             chksums.append(hash)
         else: