From: Olof Johansson <olof.johansson@axis.com>
To: openembedded-core@lists.openembedded.org
Cc: Olof Johansson <olofjn@axis.com>
Subject: [PATCH 2/4] spdx.bbclass: Fix undefined variable error
Date: Mon, 16 Jul 2018 17:05:54 +0200 [thread overview]
Message-ID: <20180716150556.16415-3-olofjn@axis.com> (raw)
In-Reply-To: <20180716150556.16415-1-olofjn@axis.com>
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>
---
meta/classes/spdx.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index ab2eaa5c0c1..9e374d70a6c 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -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:
--
2.11.0
next prev parent reply other threads:[~2018-07-16 15:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 15:05 [PATCH 0/4] Small spdx.bbclass fixes Olof Johansson
2018-07-16 15:05 ` [PATCH 1/4] spdx.bbclass: Replace deprecated string.replace with str.replace Olof Johansson
2018-07-16 15:05 ` Olof Johansson [this message]
2018-07-16 15:05 ` [PATCH 3/4] spdx.bbclass: Make use of bb.utils' sha1_file() Olof Johansson
2018-07-16 15:05 ` [PATCH 4/4] spdx.bbclass: Encode strings before passing to hashlib Olof Johansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180716150556.16415-3-olofjn@axis.com \
--to=olof.johansson@axis.com \
--cc=olofjn@axis.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox